Dropped Calls after 15 minutes

Discussions about using SIP Sorcery on your own computer/server
wildsip
Posts: 23
Joined: Sun Jun 19, 2011 2:42 am

Dropped Calls after 15 minutes

Postby wildsip » Fri Dec 27, 2013 11:23 pm

I get dropped calls after 15 minutes for some providers. The providers tell me that they send a re-INVITE request every 15 minutes. It seems the SIPSorcery local server does not respond to the re-INVITE requests and so the call gets dropped at the provider's end.

Is there a setting to make the SIPSorcery local server respond to re-INVITE request ? Or if you can point me to where in the source code this needs to happen, that would be helpful.

Thanks.

User avatar
Aaron
Site Admin
Posts: 4546
Joined: Thu Jul 12, 2007 12:13 am

Re: Dropped Calls after 15 minutes

Postby Aaron » Sat Dec 28, 2013 10:08 pm

The sipsorcery server should be responding to the re-INVITE but whether or not it's the response the provider requires is another matter.

To see what's happening see if you can capture the re-INVITE request and response and post them here. You can capture the packets by logging into the ssh instance hosted by the sipsorcery server and using a filter of "event full and request invite".

wildsip
Posts: 23
Joined: Sun Jun 19, 2011 2:42 am

Re: Dropped Calls after 15 minutes

Postby wildsip » Sun Dec 29, 2013 1:37 pm

I think I have found why it drops calls. I have setup my local SS instance to use my public IP interface (208.195.xx.xx, no NAT involved) and port 8060 for the SIP proxy socket and the outbound proxy. (.config file). I closed port 5060 on my firewall. However SIP sorcery seems to insist on using port 5060 when talking with any providers. Not sure why this is even though i specified a different outbound proxy port.

This is the line in the root.log I am referring to:

2013-12-30 00:06:31,820 [forkcall-000631-556] DEBUG dialplan [(null)] - as (06:31:820 myaccountuser): SIPClientUserAgent Call using alternate outbound proxy of udp:208.195.xx.xx:5060.

So when the provider sends a re-INVITE, it arrives on port 5060, which I closed on my FW.


my sipsorcery-appsvr.exe.config looks like this:

<sipregistrationagent>
.....
<OutboundProxy value="208.195.xx.xx:8060" />
....</>

<sipappserver>
.....
<OutboundProxy value="208.195.xx.xx:8060" />
.....
</>

My proxyscript.py has these lines:

m_registrarSocket = "udp:208.195.xx.xx:5001"
m_regAgentSocket = "udp:208.195.xx.xx:5002"
m_proxySocketForRegisters = "udp:208.195.xx.xx:8060"
m_proxySocketInternal = "udp:208.195.xx.xx:8060"
m_appServerSocket = "udp:208.195.xx.xx:5065"

If I delete the port 5060 sip socket in the sipsorcery-appsvr.exe.config below, then it uses port 8060 to talk with providers, but incoming calls fail as it tries to switch to the alternate outbound proxy 208.195.xx.xx:5060 and there is no such socket listening.

<sipproxy>
...
<sipsockets>
<socket>208.195.xx.xx:8060</socket>
<socket>208.195.xx.xx:5060</socket>
...


Why is it always using the alternate outbound proxy on port 5060, even if I specify otherwise ? Is this port hard-coded somewhere ?

User avatar
Aaron
Site Admin
Posts: 4546
Joined: Thu Jul 12, 2007 12:13 am

Re: Dropped Calls after 15 minutes

Postby Aaron » Tue Dec 31, 2013 9:47 am

Outgoing INVITE requests use the address in the sipappserver/OutboundProxy as the one they will send from. However in the case of in-dialogue requests, as the re-INVITE is, it's not the address the request gets sent from that matters it's the address in the request's Contact header.

The sipsorcery proxy will replace the Contact header address with it's default address which is whichever one is first in the list. So if you put the 8060 address at the top of your sipproxy sockets it should be the one set as the default Contact on outgoing requests and your re-INVITEs should get through.

wildsip
Posts: 23
Joined: Sun Jun 19, 2011 2:42 am

Re: Dropped Calls after 15 minutes

Postby wildsip » Wed Jan 01, 2014 8:30 pm

Thanks for the info and help. Looks like it works after I changed the order of the sipsocket to have 8060 as the first one.


Return to “Local Version”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest