How to register to a 3rd party SIP provider

Discussions about using SIP Sorcery on your own computer/server
Post Reply
haohaolee
Posts: 6
Joined: Fri Mar 30, 2012 1:42 am

How to register to a 3rd party SIP provider

Post by haohaolee » Mon Apr 02, 2012 12:42 pm

Hi,

I tried sipsorcery locally, and I used xmlconfig. I put a record in the sipproviders.xml, without too many modifications to the other configs. Now I can use softphone to connect the sipsorcery.

But from the console output, I find nothing about registering to 3rd party provider. Then I checked the info from the provider's website, it indeed has no registration of sipsorcery.

Did I miss something?

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: How to register to a 3rd party SIP provider

Post by Aaron » Tue Apr 03, 2012 11:08 am

You should get some messages on the console, which are repeated in the root.log file, which will tell you what's going on. Feel free to post them up here if you want me to interpret them.

haohaolee
Posts: 6
Joined: Fri Mar 30, 2012 1:42 am

Re: How to register to a 3rd party SIP provider

Post by haohaolee » Tue Apr 03, 2012 3:44 pm

yes here is the console output

Code: Select all

$ ./sipsorcery-appsvr.exe -c
Starting logging initialisation.
Logging initialised.
SIP App Server starting
SIP App Server Console starting...
pid=4596.
os=Microsoft Windows NT 6.1.7601 Service Pack 1.
current directory=D:\sipsorcery-1.2.
base directory=D:\sipsorcery-1.2\.
 1 SIPSorcery.SIP.App.SIPAccount assets loaded from XML record set.
Starting file watch on D:\sipsorcery-1.2\xmlconfig and sipaccounts.xml.
 1 SIPSorcery.SIP.App.SIPDialPlan assets loaded from XML record set.
Starting file watch on D:\sipsorcery-1.2\xmlconfig and sipdialplans.xml.
 1 SIPSorcery.SIP.App.SIPProvider assets loaded from XML record set.
Starting file watch on D:\sipsorcery-1.2\xmlconfig and sipproviders.xml.
 no SIPSorcery.SIP.App.SIPProviderBinding assets loaded from XML record set.
Starting file watch on D:\sipsorcery-1.2\xmlconfig and sipproviderbindings.xml.
Starting file watch on D:\sipsorcery-1.2\xmlconfig and sipdomains.xml.
 SIPDomainManager added domain: haohaolee-pc.jialuo.org.
 added domain alias 10.1.2.163.
 added domain alias 10.1.2.163:5060.
 added domain alias local.
 added domain alias *.
 SIPDomainManager wildcard domain set to haohaolee-pc.jialuo.org.
 1 SIPSorcery.SIP.App.SIPRegistrarBinding assets loaded from XML record set.
Starting file watch on D:\sipsorcery-1.2\xmlconfig and sipregistrarbindings.xml.
 1 SIPSorcery.SIP.App.SIPDialogueAsset assets loaded from XML record set.
Starting file watch on D:\sipsorcery-1.2\xmlconfig and sipdialogues.xml.
 5 SIPSorcery.SIP.App.SIPCDRAsset assets loaded from XML record set.
Starting file watch on D:\sipsorcery-1.2\xmlconfig and sipcdrs.xml.
 1 SIPSorcery.CRM.Customer assets loaded from XML record set.
Starting file watch on xmlconfig and customers.xml.
 no SIPSorcery.CRM.CustomerSession assets loaded from XML record set.
Starting file watch on xmlconfig and customersessions.xml.
SIP Proxy daemon starting...
 SIP Proxy monitor sender initialised for 127.0.0.1:10001.
Creating SIP Channel for <socket>*:5060</socket>.
 attempting to create SIP UDP channel for 10.1.2.163:5060.
SIPUDPChannel listener created 10.1.2.163:5060.
 attempting to create SIP UDP channel for 127.0.0.1:5060.
SIPUDPChannel socket on udp:10.1.2.163:5060 listening started.
SIPUDPChannel socket on udp:127.0.0.1:5060 listening started.
SIPUDPChannel listener created 127.0.0.1:5060.
Creating SIP Channel for <socket protocol="tcp">*:5060</socket>.
 attempting to create SIP TCP channel for 10.1.2.163:5060.
SIP TCP Channel listener created 10.1.2.163:5060.
 attempting to create SIP TCP channel for 127.0.0.1:5060.
SIP TCP Channel listener created 127.0.0.1:5060.
SIPTCPChannel socket on tcp:10.1.2.163:5060 listening started.
No call dispatcher file specified for SIP Proxy.
Exception SIPProxyDispatcher StartService. Service 'SIPSorcery.Servers.SIPProxyDispatcher' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.
Compiling IronPython script file from D:\sipsorcery-1.2\proxyscript.py.
SIPUDPChannel listener created 127.0.0.1:9001.
SIPUDPChannel socket on udp:127.0.0.1:9001 listening started.
NATKeepAlive Relay instantiated on 127.0.0.1:9001.
SIP Proxy daemon successfully started.
SIPMonitorDaemon starting...
The SIP Monitor Server was successfully started, loopback port 10001.
Exception starting internal notifications TCP hosted service. HTTP could not register URL http://+:8091/notifications/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details).
SIP Registrar daemon starting...
Monitor channel initialised for 127.0.0.1:10001.
Creating SIP Channel for <sipsocket>127.0.0.1:5001</sipsocket>.
 attempting to create SIP UDP channel for 127.0.0.1:5001.
SIPUDPChannel listener created 127.0.0.1:5001.
SIPUDPChannel socket on udp:127.0.0.1:5001 listening started.
Added useragent config, useragent=fring, expiry=3600s, contact lists=True.
Added useragent config, useragent=Nokia, expiry=3600s, contact lists=False.
Added useragent config, useragent=Cisco-CP7960G/8.0, expiry=60s, contact lists=False.
Added useragent config, useragent=.*, expiry=113s, contact lists=True.
SIP Registrar successfully started.
SIP Registration Agent daemon starting...
Monitor channel initialised for 127.0.0.1:10001.
Creating SIP Channel for <sipsocket>127.0.0.1:5002</sipsocket>.
 attempting to create SIP UDP channel for 127.0.0.1:5002.
SIPUDPChannel socket on udp:127.0.0.1:5002 listening started.
SIPUDPChannel listener created 127.0.0.1:5002.
SIPRegistrationAgent thread started.
Starting 1 monitor registration threads.
SIP Registration Agent successfully started.
SSHServerDaemon starting...
Initiating SIP Application Server Agent.
Creating SIP Channel for <socket>127.0.0.1:5065</socket>.
 attempting to create SIP UDP channel for 127.0.0.1:5065.
SIPUDPChannel listener created 127.0.0.1:5065.
SIPUDPChannel socket on udp:127.0.0.1:5065 listening started.
Ruby common script file changed, reloading ruby common script.
Starting file watch on Ruby Common Script D:\sipsorcery-1.2\dialplan-common.rby.
Exception starting Provisioning hosted service. HTTP could not register URL http://+:8080/provisioning.svc/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details).
Exception starting CrossDomain hosted service. HTTP could not register URL http://+:8080/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details).
Exception starting CallManager hosted service. HTTP could not register URL http://+:8080/callmanager.svc/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details).
Exception starting SIPNotificationsService hosted service. HTTP could not register URL http://+:8080/notificationspull.svc/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details).
SIPTCPChannel socket on tcp:127.0.0.1:5060 listening started.
SIPProxyDaemon STUN client started.
STUNClient attempting to determine public IP from stun.ekiga.net.
STUNClient Response to initial STUN message received from 77.72.169.158:3478.
STUNClient Public IP=116.207.155.127.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Binding to IP endpoint: [0.0.0.0:22]
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
re: Register queued for sip:haohaolee@haohaolee-pc.jialuo.org.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
re: Authentication failed stale nonce for realm=haohaolee-pc.jialuo.org, username=haohaolee, uri=sip:haohaolee-pc.jialuo.org, nonce=19859690421722954690, method=REGISTER.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
re: Authentication required for haohaolee@haohaolee-pc.jialuo.org from udp:127.0.0.1:5060.
re: register result=AuthenticationRequired, time=31.0017ms, user=haohaolee.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Resending final response for REGISTER, sip:haohaolee-pc.jialuo.org, cseq=3.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
re: Register queued for sip:haohaolee@haohaolee-pc.jialuo.org.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
UpdateBinding sip:haohaolee@10.1.2.249:56050;rinstance=523e426d26cb3abe.
sip:haohaolee@10.1.2.249:56050;rinstance=523e426d26cb3abe matched sip:haohaolee@10.1.2.249:56050;rinstance=523e426d26cb3abe.
re: Binding update request for haohaolee@haohaolee-pc.jialuo.org from udp:10.1.2.249:56050, expiry requested 3600s granted 113s.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
re: Binding database update time for haohaolee@haohaolee-pc.jialuo.org took 2.0001ms.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
re: Binding update time for haohaolee@haohaolee-pc.jialuo.org took 26.0015ms.
re: Registration successful for haohaolee@haohaolee-pc.jialuo.org from udp:10.1.2.249:56050 (proxy=udp:10.1.2.163:5060), expiry 113s.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
re: register result=Authenticated, time=36.002ms, user=haohaolee.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
re: Register queued for sip:haohaolee@haohaolee-pc.jialuo.org.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
UpdateBinding sip:haohaolee@10.1.2.249:56050;rinstance=523e426d26cb3abe.
sip:haohaolee@10.1.2.249:56050;rinstance=523e426d26cb3abe matched sip:haohaolee@10.1.2.249:56050;rinstance=523e426d26cb3abe.
re: Binding expired by client for haohaolee@haohaolee-pc.jialuo.org from udp:10.1.2.249:56050.
Exception SIPMonitorControlClientEvent ParseEventCSV. String was not recognized as a valid DateTime.
re: Binding update time for haohaolee@haohaolee-pc.jialuo.org took 3.0002ms.
re: Registration successful for haohaolee@haohaolee-pc.jialuo.org from udp:10.1.2.249:56050 (proxy=udp:10.1.2.163:5060), expiry -1s.
re: register result=Authenticated, time=6.0003ms, user=haohaolee.
Currently I don't care the exceptions, because my softphone works well, it can dial other sip uri.
I just wonder why ss doesn't register to 3rdparty provider because I have one in sipproviders.xml.

Code: Select all

<sipproviders>
 <sipprovider>
   <id>f39e90ac-24c4-414f-97e6-9adf0c795b41</id>
   <providertype>SIP</providertype>
   <owner>haohaolee</owner>
   <adminmemberid></adminmemberid>
   <providername>localphone</providername>
   <providerusername>xxxxx</providerusername>
   <providerpassword>xxxxx</providerpassword>
   <providerserver>sip:localphone.com</providerserver>
   <providerauthusername></providerauthusername>
   <provideroutboundproxy></provideroutboundproxy>
   <providerfrom></providerfrom>
   <providercustomheader></providercustomheader>
   <registercontact>sip:haohaolee@haohaolee-pc.jialuo.org</registercontact>
   <registerexpiry>3600</registerexpiry>
   <registerserver></registerserver>
   <registerrealm></registerrealm>
   <registerenabled>True</registerenabled>
   <registerenabledadmin>True</registerenabledadmin>
   <registerdisabledreason></registerdisabledreason>
 </sipprovider>
</sipproviders>

haohaolee
Posts: 6
Joined: Fri Mar 30, 2012 1:42 am

Re: How to register to a 3rd party SIP provider

Post by haohaolee » Tue Apr 03, 2012 5:17 pm

And the when the server is up, the sipproviderbindings.xml has nothing new but only <sipproviderbindings/>

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: How to register to a 3rd party SIP provider

Post by Aaron » Wed Apr 04, 2012 11:45 am

There's no attempt to do the 3rd party registration from your console trace. If you are editing the XML files manually you will need to manually insert a record into the sipproviderbindings.xml. The way it works is that when the web service receives an update for a SIP provider it decides whether a new SIP provider binding record is required and if so inserts it. The actual server doing the registrations never inserts new SIP provider binding records.

haohaolee
Posts: 6
Joined: Fri Mar 30, 2012 1:42 am

Re: How to register to a 3rd party SIP provider

Post by haohaolee » Wed Apr 04, 2012 4:15 pm

Thanks. got it working now.

BTW, my attempt was to make SS running on mono, I know somebody on this forum had already done this, but without much information. Now I get it work on Mono 2.10.6 too, with basic functionality. I don't know much about Mono, so I'm not sure if WCF part can work with silverlight client.

I will share more information after some cleanups and organization.

Post Reply