Sipgate one way audio in iphone while on AT&T

Discussions about using SIP Sorcery on your own computer/server
jaminmc
Posts: 22
Joined: Tue Oct 13, 2009 8:24 pm

Sipgate one way audio in iphone while on AT&T

Post by jaminmc » Fri Jan 08, 2010 4:03 pm

Ok, Voipstunt, and gizmo5 work just fine through my local sipsorcery (Which is on a server at my office) while going through 3g. But with sipgate, I can't hear the other person, but they can hear me. It is the same, wether I recieve a incoming call, or if I use it with google voice.

If i connect to my wifi at home, it works fine. If I connect VPN to my home network, it works too. But when I am on my wifi at my work, it also doesn't work, just like when I am using AT&T-- No sound on my end..

I have incoming ports 5060 & 5061, 8080 both TCP&UDP forwarded to my sipsorcory server, and I have upnp enabled on my router, which is running DD-WRT v24-sp2 (10/10/09) mega. It is running on a Windows 2003 server. I even did a DMZ to the sipsorcery server, and it did the same thing....

For some reason sipgate seems to be real finicky. Using a STUN server doesn't help either.

If I put the same setting in my iSip program that I have in sipsorcery, 2 way audio works totally fine, both over AT&T and my office wifi. So there has to be something that is causing it not to work with sipsorcery.

I also tried siphon, and same exact results.
Last edited by jaminmc on Fri Jan 08, 2010 7:24 pm, edited 1 time in total.

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

Post by Aaron » Fri Jan 08, 2010 6:11 pm

If you connect your ATA directly to sipgate from the same set up does it work?

Regards,

Aaron

jaminmc
Posts: 22
Joined: Tue Oct 13, 2009 8:24 pm

Post by jaminmc » Mon Jan 11, 2010 7:36 am

By ATA, being my iphone, yes. on the same network as my sipsorcery server, using the sipgate settings that match my sipsorcery setup for sipgate, i get 2 way audio, but on the same network as my sipgate, it doesn't.

One other thing to note is that I have my domain setup as mydomain.homeip.net for my sipsorcery. It is pointed to lets just say 68.68.68.68 is the ipaddress for mydomain.homeip.net. In my setup for the database, I have the following under my domain alias.

Code: Select all

local;mydomain.homeip.net:5060;localhost;68.68.68.68;68.68.68.68:5060;127.0.0.1;127.0.0.1:5060;192.168.1.103;192.168.1.103:5060
My server is 192.168.1.103, and up till today, it was misconfigured to show is as 192.168.0.103 instead in that alias list. But I don't think that could cause the sipgate problem. I will test it tomorrow (well today) when I go to work.

I have incoming ports 5060, 5061, 8080, 4502, 4503, and 80 pointing to it with the webserver having sipsorcery.html and the codebin in it. For some reason, if I try to connect to my sipsorcery from the internet, it site on initializing for a while, then fails. So it seems that I cant login, unless I am in the 192.168.1.xx ip range. even though port 8080 is forwarded.

I followed the "Local Version Install Guide with Postgres DB" directions. And ran then "httpcfg set urlacl /u http://+:8080/ /a D:(A;;GX;;;LS)", but my windows 2003 server didn't have it installed. and I couldn't find the windows disk to install it, so I found one from windows XP, and it seems to work. I get this message "HttpSetServiceConfiguration completed with 183.

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

Post by Aaron » Mon Jan 11, 2010 8:11 am

A misconfigured domain could affect your ability to make calls but won't play any part in audio issues.

Do you have a PublicIPAddress setting in the sipproxy node in the config file. If so double check it is correct.

Regards,

Aaron

jaminmc
Posts: 22
Joined: Tue Oct 13, 2009 8:24 pm

Post by jaminmc » Mon Jan 11, 2010 2:59 pm

Here is my config file:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
    <section name="sipappserver" type="SIPSorcery.SIPAppServer.SIPAppServerState, sipsorcery-appsvr" />
    <section name="sipregistrar" type="SIPSorcery.SIPRegistrar.SIPRegistrarState, sipsorcery-appsvr" />
    <section name="sipregistrationagent" type="SIPSorcery.SIPRegistrationAgent.SIPRegAgentState, sipsorcery-appsvr" />
    <section name="sipproxy" type="SIPSorcery.SIPProxy.SIPProxyState, sipsorcery-appsvr" />
    <section name="sipmonitor" type="SIPSorcery.SIPMonitor.SIPMonitorState, sipsorcery-appsvr"/>
  </configSections>
  <log4net>
    <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%m%n" />
      </layout>
    </appender>
    <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender,log4net">
      <param name="File" value="C:\Temp\sipsorcery-v1.1\root.log" />
      <param name="AppendToFile" value="false" />
      <param name="MaxSizeRollBackups" value="3" />
      <param name="MaximumFileSize" value="500kB" />
      <param name="RollingStyle" value="Size" />
      <param name="StaticLogFileName" value="true" />
      <layout type="log4net.Layout.PatternLayout,log4net">
        <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n" />
      </layout>
    </appender>
    <appender name="ErrorRollingLogFileAppender" type="log4net.Appender.RollingFileAppender,log4net">
      <param name="File" value="C:\Temp\sipsorcery-v1.1\error.log" />
      <param name="AppendToFile" value="false" />
      <param name="MaxSizeRollBackups" value="5" />
      <param name="MaximumFileSize" value="1MB" />
      <param name="RollingStyle" value="Size" />
      <param name="StaticLogFileName" value="true" />
      <filter type="log4net.Filter.LevelRangeFilter">
        <levelMin value="ERROR" />
        <levelMax value="FATAL" />
      </filter>
      <layout type="log4net.Layout.PatternLayout,log4net">
        <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n" />
      </layout>
    </appender>
    <root>
      <priority value="DEBUG" />
      <appender-ref ref="ConsoleAppender" />
      <appender-ref ref="RollingLogFileAppender" />
      <appender-ref ref="ErrorRollingLogFileAppender" />
    </root>
  </log4net>
  <system.serviceModel>
    <extensions>
      <behaviorExtensions>
        <add name="silverlightFaults" type="SIPSorcery.SIP.App.SilverlightFaultBehavior, SIPSorcery.SIP.App, Version=0.2.0.1, Culture=neutral, PublicKeyToken=null" />
      </behaviorExtensions>
    </extensions>
    <services>
      <service name="SIPSorcery.SIP.App.CrossDomainService">
        <host>
          <baseAddresses>
            <add baseAddress="http://*:8080/"/>
          </baseAddresses>
        </host>
        <endpoint address="" binding="webHttpBinding" contract="SIPSorcery.SIP.App.ICrossDomain" behaviorConfiguration="HttpEnableBehavior" />
      </service>
      <service name="SIPSorcery.SIP.App.SIPProvisioningWebService" behaviorConfiguration="PersistorTypeBehaviors">
        <host>
          <baseAddresses>
            <add baseAddress="http://*:8080/provisioning.svc"/>
          </baseAddresses>
        </host>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <endpoint address="" behaviorConfiguration="SilverlightFaultBehavior" binding="basicHttpBinding" 
                   contract="SIPSorcery.SIP.App.IProvisioningService" bindingConfiguration="LargeMessagesBindingConfiguration"/>
      </service>
      <service behaviorConfiguration="GetServiceBehavior" name="SIPSorcery.Servers.CallManagerServices">
        <host>
          <baseAddresses>
            <add baseAddress="http://*:8080/callmanager" />
          </baseAddresses>
        </host>
        <endpoint address="" behaviorConfiguration="HttpEnableBehavior" binding="webHttpBinding" contract="SIPSorcery.Servers.ICallManagerServices" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="PersistorTypeBehaviors" >
          <serviceMetadata httpGetEnabled="True"/>
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
        <behavior name="GetServiceBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl="" />
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="SilverlightFaultBehavior">
          <silverlightFaults />
        </behavior>
        <behavior name="HttpEnableBehavior">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="LargeMessagesBindingConfiguration">
          <readerQuotas maxStringContentLength="40000" />
        </binding>
      </basicHttpBinding>
    </bindings>
  </system.serviceModel>
  <appSettings>
<!--<add key="PersistenceStorageType" value="XML" />
<add key="PersistenceConnStr" value="c:\temp\sipsorcery-v1.1\xmlconfig\" />-->
<add key="PersistenceStorageType" value="DBLinqPostgresql" />
<add key="PersistenceConnStr" value="Database=sipsorcery;Host=localhost;User Id=postgres;Password=xxxxxx" />
<!--<add key="PersistenceStorageType" value="DBLinqMySQL" />
<add key="PersistenceConnStr" value="Database=sipsorcery;Data Source=localhost;User Id=root;Password=password" />-->
<add key="UserDataDBType" value="Postgresql" />
<add key="UserDataDBConnStr" value="Database=sipsorcery;Host=localhost;User Id=postgres;Password=xxxxxx" />
<add key="HTTPServerBaseDirectory" value="c:\temp\sipsorcery-v1.1\" />
  </appSettings>
  <!-- SIP Proxy configuration. -->
  <sipproxy>
    <MonitorLoopbackPort value="10001" />
    <ProxyScriptPath value="C:\Temp\sipsorcery-v1.1\proxyscript.py" />
    <NATKeepAliveSocket value="127.0.0.1:9001" />
    <PublicIPAddress value="68.68.68.68" />
    <!-- STUNServerHostname value="stun.xten.com" /-->
    <sipsockets>
      <socket>*:5060</socket>
      <socket protocol="tcp">*:5060</socket>
    </sipsockets>
  </sipproxy>
  <!-- SIP Monitor configuration. -->
  <sipmonitor>
    <MonitorLoopbackPort value="10001" />
    <SilverlightPolicyFilePath value="C:\Temp\sipsorcery-v1.1\silverlight-policy.xml" />
    <sipmonitorclientsockets>
      <socket>*:11001</socket>
      <socket>*:4502</socket>
    </sipmonitorclientsockets>
    <sipmonitormachinesockets>
      <socket>*:4503</socket>
    </sipmonitormachinesockets>
  </sipmonitor>
  <!-- SIP Registrar configuration. -->
  <sipregistrar>
    <MonitorLoopbackPort value="10001" />
    <MaximumAccountBindings value="10" />
    <NATKeepAliveRelaySocket value="127.0.0.1:9001" />
    <sipsockets>
      <sipsocket>127.0.0.1:5001</sipsocket>
    </sipsockets>
    <useragentconfigs>
      <useragent expiry="3600" contactlists="true">fring</useragent>
      <useragent expiry="3600" contactlists="false">Nokia</useragent>
      <useragent expiry="60" contactlists="false">Cisco-CP7960G/8.0</useragent>
      <useragent expiry="113">.*</useragent>
    </useragentconfigs>
  </sipregistrar>
  <!-- SIP Registration Agent configuration. -->
  <sipregistrationagent>
    <MonitorLoopbackPort value="10001" />
    <OutboundProxy value="127.0.0.1:5060" />
    <sipsockets>
      <sipsocket>127.0.0.1:5002</sipsocket>
    </sipsockets>
  </sipregistrationagent>
  <!-- SIP Application Server configuration. -->
  <sipappserver>
    <MonitorLoopbackPort value="10001" />
    <TraceDirectory value="C:\Temp\sipsorcery-v1.1\traces\" />
    <RubyScriptCommonPath value="C:\Temp\sipsorcery-v1.1\dialplan-common.rby" />
    <OutboundProxy value="127.0.0.1:5060" />
    <sipsockets>
      <socket>127.0.0.1:5065</socket>
    </sipsockets>
  </sipappserver>
</configuration>
Im noticing that it is monitoring port 10001 in the config, and there is reference to other ports too, like 5002. What are all the ports I am supposed to forward from "68.68.68.68" to "192.168.1.103" for this to work correctly, as this computer doesn't have a direct connection to the internet?
Note, We have Time Warner Business Class internet, with a static IP. 2MB up 7MB down. If that matters at all. The computer is connected directly to the router, so it has a minimal ping time.

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

Post by Aaron » Mon Jan 11, 2010 3:10 pm

You don't need to forward any other ports other than ones you want the proxy to listen on which in your case is only 5060. All the other ports are for the traffic between the proxy and the other servers and for things like monitoring which is also only internal.

I've tested calling the sipgate 10005 echo test number from my local install and it works properly. Try testing that and see what happens.

Regards,

aaron

jaminmc
Posts: 22
Joined: Tue Oct 13, 2009 8:24 pm

Post by jaminmc » Mon Jan 11, 2010 8:18 pm

I can call out with sipgate no problem. (Tested by calling a 800 number) It is Incoming calls from sipgate that I have problems with.

Ok, In sipsorcery.com, I have my account setup the same. When I am connected over 3g on my iphone, I am missing audio on incoming calls only, the same as with my local sipsorcery. When I am on my work network, i get 2 way audio using sipsorcery.com, but not on my local server on my same network. (Even if I have it set to go to 192.168.1.103 to connect to it, instead of mydomain.homeip.net it makes no difference)

Below is my Trace for the incoming call. I did replace personal info to protect myself :)

My iphone does get ip from AT&T of 10.56.239.98, but its real ip address on the internet is 166.137.10.200. AT&T seems to not give real ip addresses to their devices, and they have a NAT on their end, of which the end users have no control over.

With my iSip programmed to the Sipgate settings instead of going through sipgate.com, I am able to have 2 way audio on both incoming and outgoing calls.

Code: Select all

SIPTransaction=> SIPTransaction=>Request received udp:10.248.58.129:5070<-udp:10.248.58.129:5060
INVITE sip:SipSorceryUsername@sipsorcery.com;rinstance=264030 SIP/2.0
Via: SIP/2.0/UDP 10.248.58.129:5060;branch=z9hG4bK8d3b7fba1deb5b8776c2f0ec1365c6a8f2427a47
Via: SIP/2.0/UDP 204.155.28.10:5060;branch=z9hG4bKd6c7.3a764655.1
Via: SIP/2.0/UDP 172.30.20.2;branch=z9hG4bKd6c7.3a764655.1
Via: SIP/2.0/UDP 204.155.28.10:5060;received=204.155.28.20;branch=z9hG4bK7db4cd82
Via: SIP/2.0/UDP 204.155.29.58:5060;branch=z9hG4bK7db4cd82;rport=5060
To: <sip:3001xxxxx@sipgate.com>
From: "7045551212" <sip:7045551212@sipgate.com>;tag=as716e345c
Call-ID: 06b8f34419b4783e6bc2bde2005eb972@sipgate.com
CSeq: 103 INVITE
Contact: <sip:7045551212@204.155.29.58>
Max-Forwards: 66
Record-Route: <sip:204.155.28.10;lr=on;ftag=as716e345c>,<sip:172.30.20.2;lr=on>,<sip:204.155.28.10;lr=on;ftag=as716e345c>
Supported: replaces, timer
Content-Length: 430
Content-Type: application/sdp
Proxy-ReceivedFrom: udp:204.155.28.10:5060
Proxy-ReceivedOn: udp:10.248.58.129:5060
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
X-FORWARD-HISTORY: nosettings

v=0
o=root 1366354709 1366354710 IN IP4 204.155.29.58
s=sipgate VoIP GW
c=IN IP4 204.155.29.58
t=0 0
m=audio 15692 RTP/AVP 0 8 3 97 18 112 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:112 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

DialPlan=> Dialplan trace commenced at 11 Jan 2010 12:02:21:380.
DialPlan=> WebGet attempting to read from http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D'http%3A%2F%2Fapi.whitepages.com%2Freverse_phone%2F1.0%2F%3Fphone%3D7045551212%3Bapi_key%3D4fbe5466886b0b15362xxxxxxxxxxxxx'%20and%20itemPath%3D'wp.listings.listing.displayname'&format=json.
DialPlan=> Caller's number: '17045551212'
DialPlan=> Commencing Dial with: SipSorceryUsername@local[fu=17045551212].
DialPlan=> ForkCall commencing call leg to sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP.
DialPlan=> SIPClientUserAgent Call using alternate outbound proxy of udp:10.248.58.129:5060.
DialPlan=> Switching to sip:SipSorceryUsername@166.137.10.200:62874 via udp:10.248.58.129:5060.
DialPlan=> SDP on UAC call had public IP not mangled, RTP socket 204.155.29.58:15692.
SIPTransaction=> Send Request reliable udp:10.248.58.129:5070->udp:10.248.58.129:5060
INVITE sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bK338306813d2f48ae8773f283b84284b4
To: <sip:SipSorceryUsername@sipsorcery.com>
From: "17045551212" <sip:17045551212@sipgate.com>;tag=1947514197
Call-ID: 12f86614abf643bca7e1a12504ec60fe
CSeq: 1 INVITE
Contact: <sip:10.248.58.129:5070>
Max-Forwards: 70
User-Agent: www.sipsorcery.com
Content-Length: 430
Content-Type: application/sdp
Proxy-SendFrom: udp:10.248.58.129:5060

v=0
o=root 1366354709 1366354710 IN IP4 204.155.29.58
s=sipgate VoIP GW
c=IN IP4 204.155.29.58
t=0 0
m=audio 15692 RTP/AVP 0 8 3 97 18 112 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:112 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

SIPTransaction=> Send Request retransmit 2 udp:10.248.58.129:5070->udp:10.248.58.129:5060
INVITE sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bK338306813d2f48ae8773f283b84284b4
To: <sip:SipSorceryUsername@sipsorcery.com>
From: "17045551212" <sip:17045551212@sipgate.com>;tag=1947514197
Call-ID: 12f86614abf643bca7e1a12504ec60fe
CSeq: 1 INVITE
Contact: <sip:10.248.58.129:5070>
Max-Forwards: 70
User-Agent: www.sipsorcery.com
Content-Length: 430
Content-Type: application/sdp
Proxy-SendFrom: udp:10.248.58.129:5060

v=0
o=root 1366354709 1366354710 IN IP4 204.155.29.58
s=sipgate VoIP GW
c=IN IP4 204.155.29.58
t=0 0
m=audio 15692 RTP/AVP 0 8 3 97 18 112 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:112 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

SIPTransaction=> Received Response udp:10.248.58.129:5070<-udp:10.248.58.129:5060
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bK338306813d2f48ae8773f283b84284b4
To: <sip:SipSorceryUsername@sipsorcery.com>
From: "17045551212" <sip:17045551212@sipgate.com>;tag=1947514197
Call-ID: 12f86614abf643bca7e1a12504ec60fe
CSeq: 1 INVITE
Content-Length: 0
Proxy-ReceivedFrom: udp:166.137.10.200:62874
Proxy-ReceivedOn: udp:10.248.58.129:5060


DialPlan=> Information response 100 Trying for sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP.
SIPTransaction=> Received Response udp:10.248.58.129:5070<-udp:10.248.58.129:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bK338306813d2f48ae8773f283b84284b4
To: <sip:SipSorceryUsername@sipsorcery.com>;tag=ivrifnsusolu8vjz7p-abzzzra69y5dp
From: "17045551212" <sip:17045551212@sipgate.com>;tag=1947514197
Call-ID: 12f86614abf643bca7e1a12504ec60fe
CSeq: 1 INVITE
Contact: <sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP>
Content-Length: 0
Proxy-ReceivedFrom: udp:166.137.10.200:62874
Proxy-ReceivedOn: udp:10.248.58.129:5060
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, PUBLISH, REFER, MESSAGE, OPTIONS


DialPlan=> Information response 180 Ringing for sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP.
SIPTransaction=> Send Info Response udp:10.248.58.129:5070->udp:10.248.58.129:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.248.58.129:5060;branch=z9hG4bK8d3b7fba1deb5b8776c2f0ec1365c6a8f2427a47
Via: SIP/2.0/UDP 204.155.28.10:5060;branch=z9hG4bKd6c7.3a764655.1
Via: SIP/2.0/UDP 172.30.20.2;branch=z9hG4bKd6c7.3a764655.1
Via: SIP/2.0/UDP 204.155.28.10:5060;received=204.155.28.20;branch=z9hG4bK7db4cd82
Via: SIP/2.0/UDP 204.155.29.58:5060;branch=z9hG4bK7db4cd82;rport=5060
To: <sip:3001xxxxx@sipgate.com>
From: "7045551212" <sip:7045551212@sipgate.com>;tag=as716e345c
Call-ID: 06b8f34419b4783e6bc2bde2005eb972@sipgate.com
CSeq: 103 INVITE
Content-Length: 0


SIPTransaction=> Received Response udp:10.248.58.129:5070<-udp:10.248.58.129:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bK338306813d2f48ae8773f283b84284b4
To: <sip:SipSorceryUsername@sipsorcery.com>;tag=ivrifnsusolu8vjz7p-abzzzra69y5dp
From: "17045551212" <sip:17045551212@sipgate.com>;tag=1947514197
Call-ID: 12f86614abf643bca7e1a12504ec60fe
CSeq: 1 INVITE
Contact: <sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP>
Content-Length: 0
Proxy-ReceivedFrom: udp:166.137.10.200:62874
Proxy-ReceivedOn: udp:10.248.58.129:5060
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, PUBLISH, REFER, MESSAGE, OPTIONS


DialPlan=> Information response 180 Ringing for sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP.
SIPTransaction=> Received Response udp:10.248.58.129:5070<-udp:10.248.58.129:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bK338306813d2f48ae8773f283b84284b4
To: <sip:SipSorceryUsername@sipsorcery.com>;tag=ivrifnsusolu8vjz7p-abzzzra69y5dp
From: "17045551212" <sip:17045551212@sipgate.com>;tag=1947514197
Call-ID: 12f86614abf643bca7e1a12504ec60fe
CSeq: 1 INVITE
Contact: <sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP>
Supported: replaces, 100rel, norefersub
Content-Length: 218
Content-Type: application/sdp
Proxy-ReceivedFrom: udp:166.137.10.200:62874
Proxy-ReceivedOn: udp:10.248.58.129:5060
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, PUBLISH, REFER, MESSAGE, OPTIONS

v=0
o=- 3472228948 3472228949 IN IP4 10.56.239.98
s=pjmedia
c=IN IP4 10.56.239.98
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

SIPTransaction=> Send Request udp:10.248.58.129:5070->udp:10.248.58.129:5060
ACK sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bK8cf6ae05197a4ad6a76659ccd23e6aec
To: <sip:SipSorceryUsername@sipsorcery.com>;tag=ivrifnsusolu8vjz7p-abzzzra69y5dp
From: "17045551212" <sip:17045551212@sipgate.com>;tag=1947514197
Call-ID: 12f86614abf643bca7e1a12504ec60fe
CSeq: 1 ACK
Max-Forwards: 70
Content-Length: 0
Proxy-SendFrom: udp:10.248.58.129:5060


DialPlan=> Response 200 OK for sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP.
DialPlan=> SDP on UAC response had RTP socket mangled from 10.56.239.98:4000 to 166.137.10.200:4000.
DialPlan=> Cancelling all call legs for ForkCall app.
SIPTransaction=> Send Final Response Reliable udp:10.248.58.129:5070->10.248.58.129:5060
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 10.248.58.129:5060;branch=z9hG4bK8d3b7fba1deb5b8776c2f0ec1365c6a8f2427a47
Via: SIP/2.0/UDP 204.155.28.10:5060;branch=z9hG4bKd6c7.3a764655.1
Via: SIP/2.0/UDP 172.30.20.2;branch=z9hG4bKd6c7.3a764655.1
Via: SIP/2.0/UDP 204.155.28.10:5060;received=204.155.28.20;branch=z9hG4bK7db4cd82
Via: SIP/2.0/UDP 204.155.29.58:5060;branch=z9hG4bK7db4cd82;rport=5060
To: <sip:3001xxxxx@sipgate.com>;tag=1592775127
From: "7045551212" <sip:7045551212@sipgate.com>;tag=as716e345c
Call-ID: 06b8f34419b4783e6bc2bde2005eb972@sipgate.com
CSeq: 103 INVITE
Contact: <sip:10.248.58.129:5070>
Record-Route: <sip:204.155.28.10;lr=on;ftag=as716e345c>,<sip:172.30.20.2;lr=on>,<sip:204.155.28.10;lr=on;ftag=as716e345c>
Server: www.sipsorcery.com
Content-Length: 220
Content-Type: application/sdp

v=0
o=- 3472228948 3472228949 IN IP4 10.56.239.98
s=pjmedia
c=IN IP4 166.137.10.200
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

DialPlan=> Dial command was successfully answered in 7.23s.
DialPlan=> Dialplan trace completed at 11 Jan 2010 12:03:01:427.

Last edited by jaminmc on Mon Jan 11, 2010 11:03 pm, edited 1 time in total.

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

Post by Aaron » Mon Jan 11, 2010 9:19 pm

Ah that's a big piece of information added to the puzzle. Double NATs are not nice and can cause havoc with SIP. I find it suprising that incoming call audio works with the xlite. The problem with double NATs is there are now two spots where the port used could be translated and it's harder to determine the public IP address to put in the SDP.

DialPlan=> Response 200 OK for sip:SipSorceryUsername@166.137.10.200:62874;transport=UDP.
DialPlan=> SDP on UAC response had RTP socket mangled from 10.56.239.98:4000 to 166.137.10.200:4000.

Is 166.137.10.200 your public IP address? I think it is in which case the local sipsorcery server is mangling the SDP correctly. I wonder if the Contact header is the problem:

Contact: <sip:10.248.58.129:5070>

In my case calls from the 10.x.x.x network are always internal and they get handled differently in the proxy script. In your case calls from the 10.x.x.x network are from the public side (could also be private side I guess so an extra trick would be needed to distinguish them). Can you post the contents of the proxyscript.py that's in your local install directory.

Regards,

Aaron

jaminmc
Posts: 22
Joined: Tue Oct 13, 2009 8:24 pm

Post by jaminmc » Mon Jan 11, 2010 11:02 pm

That trace actually wasn't from my Local Sipsorcery server, but from sipsorcery.com

I was showing that I am even having the same problem on the sipsorcery.com with 2 way audio on incoming calls from sipgate. If I connect directly to sipgate with my iphone (Using either iSip, or siphon, same as I use for sipsorcery.com) and I am using the AT&T 3G network, I get 2 way audio. If I use sipsorcery.com, then I don't get audio on my side, bit the caller does.

If I use wifi, I get 2 way audio all around using sipsorcery.com.

Note, Gizmo 5 works for 2 way audio in all my setups. So I think there is something funky with Sipsorcery.

Here is a trace calling my Google voice number, and having it come in on my Gizmo5 number. It had audio working all ways. This is using Sipsorcery.com

Code: Select all

SIPTransaction=> SIPTransaction=>Request received udp:10.248.58.129:5070<-udp:10.248.58.129:5060
INVITE sip:SS-User@sipsorcery.com;rinstance=416752 SIP/2.0
Via: SIP/2.0/UDP 10.248.58.129:5060;branch=z9hG4bK63539fac31cc0056bfcee44546d944397675b49a
Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK661.af7480a3.1
Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK661.9f7480a3.0
Via: SIP/2.0/UDP 198.65.166.147:5060;branch=z9hG4bK4b7d4ad3;rport=5060
To: <sip:747253XXXX@198.65.166.131>
From: "704375XXXX" <sip:704375XXXX@198.65.166.147>;tag=as751ce8c8
Call-ID: 0fbd818f7dd6e47306c9f71e56eb090e@198.65.166.147
CSeq: 102 INVITE
Contact: <sip:704375XXXX@198.65.166.147>
Max-Forwards: 67
Record-Route: <sip:198.65.166.131;lr;ftag=as751ce8c8>,<sip:198.65.166.131;lr;ftag=as751ce8c8>
User-Agent: SIPCallProxy1
Date: Mon, 11 Jan 2010 22:41:29 GMT
Content-Length: 315
Content-Type: application/sdp
Proxy-ReceivedFrom: udp:198.65.166.131:5060
Proxy-ReceivedOn: udp:10.248.58.129:5060
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
X-GoogleVoice: true
RemoteIP: 198.65.166.147
Subject: via Google Voice
P-hint: local number (2)

v=0
o=root 6429 6429 IN IP4 198.65.166.147
s=session
c=IN IP4 198.65.166.147
t=0 0
m=audio 14426 RTP/AVP 0 18 97 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 iLBC/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

DialPlan=> Dialplan trace commenced at 11 Jan 2010 14:41:21:630.
DialPlan=> WebGet attempting to read from http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D'http%3A%2F%2Fapi.whitepages.com%2Freverse_phone%2F1.0%2F%3Fphone%3D704375XXXX%3Bapi_key%3D4fbe5466886b0b15362xxxxxxxxxxxxx'%20and%20itemPath%3D'wp.listings.listing.displayname'&format=json.
DialPlan=> Caller's number: '1704375XXXX'
DialPlan=> Caller's name = 'Bob Dole'
DialPlan=> Commencing Dial with: SS-User@local[fu=1704375XXXX].
DialPlan=> ForkCall commencing call leg to sip:SS-User@166.137.10.200:35934;transport=UDP.
DialPlan=> SIPClientUserAgent Call using alternate outbound proxy of udp:10.248.58.129:5060.
DialPlan=> Switching to sip:SS-User@166.137.10.200:35934 via udp:10.248.58.129:5060.
DialPlan=> SDP on UAC call had public IP not mangled, RTP socket 198.65.166.147:14426.
SIPTransaction=> Send Request reliable udp:10.248.58.129:5070->udp:10.248.58.129:5060
INVITE sip:SS-User@166.137.10.200:35934;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bKbabe2e9db71342a6a9dd63e4815c0f8d
To: <sip:SS-User@sipsorcery.com>
From: "Bob Dole" <sip:1704375XXXX@198.65.166.147>;tag=1316380369
Call-ID: 319b892d037748d6882a377a2208ae50
CSeq: 1 INVITE
Contact: <sip:10.248.58.129:5070>
Max-Forwards: 70
User-Agent: www.sipsorcery.com
Content-Length: 315
Content-Type: application/sdp
Proxy-SendFrom: udp:10.248.58.129:5060

v=0
o=root 6429 6429 IN IP4 198.65.166.147
s=session
c=IN IP4 198.65.166.147
t=0 0
m=audio 14426 RTP/AVP 0 18 97 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 iLBC/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

SIPTransaction=> Send Request retransmit 2 udp:10.248.58.129:5070->udp:10.248.58.129:5060
INVITE sip:SS-User@166.137.10.200:35934;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bKbabe2e9db71342a6a9dd63e4815c0f8d
To: <sip:SS-User@sipsorcery.com>
From: "Bob Dole" <sip:1704375XXXX@198.65.166.147>;tag=1316380369
Call-ID: 319b892d037748d6882a377a2208ae50
CSeq: 1 INVITE
Contact: <sip:10.248.58.129:5070>
Max-Forwards: 70
User-Agent: www.sipsorcery.com
Content-Length: 315
Content-Type: application/sdp
Proxy-SendFrom: udp:10.248.58.129:5060

v=0
o=root 6429 6429 IN IP4 198.65.166.147
s=session
c=IN IP4 198.65.166.147
t=0 0
m=audio 14426 RTP/AVP 0 18 97 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 iLBC/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

SIPTransaction=> Received Response udp:10.248.58.129:5070<-udp:10.248.58.129:5060
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bKbabe2e9db71342a6a9dd63e4815c0f8d
To: <sip:SS-User@sipsorcery.com>
From: "Bob Dole" <sip:1704375XXXX@198.65.166.147>;tag=1316380369
Call-ID: 319b892d037748d6882a377a2208ae50
CSeq: 1 INVITE
Content-Length: 0
Proxy-ReceivedFrom: udp:166.137.10.200:35934
Proxy-ReceivedOn: udp:10.248.58.129:5060


DialPlan=> Information response 100 Trying for sip:SS-User@166.137.10.200:35934;transport=UDP.
SIPTransaction=> Received Response udp:10.248.58.129:5070<-udp:10.248.58.129:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bKbabe2e9db71342a6a9dd63e4815c0f8d
To: <sip:SS-User@sipsorcery.com>;tag=YfkmOb9pwrHE8kcwqNq1FFMn9NcD42bc
From: "Bob Dole" <sip:1704375XXXX@198.65.166.147>;tag=1316380369
Call-ID: 319b892d037748d6882a377a2208ae50
CSeq: 1 INVITE
Contact: <sip:SS-User@166.137.10.200:35934;transport=UDP>
Content-Length: 0
Proxy-ReceivedFrom: udp:166.137.10.200:35934
Proxy-ReceivedOn: udp:10.248.58.129:5060
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS


DialPlan=> Information response 180 Ringing for sip:SS-User@166.137.10.200:35934;transport=UDP.
SIPTransaction=> Send Info Response udp:10.248.58.129:5070->udp:10.248.58.129:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.248.58.129:5060;branch=z9hG4bK63539fac31cc0056bfcee44546d944397675b49a
Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK661.af7480a3.1
Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK661.9f7480a3.0
Via: SIP/2.0/UDP 198.65.166.147:5060;branch=z9hG4bK4b7d4ad3;rport=5060
To: <sip:747253XXXX@198.65.166.131>
From: "704375XXXX" <sip:704375XXXX@198.65.166.147>;tag=as751ce8c8
Call-ID: 0fbd818f7dd6e47306c9f71e56eb090e@198.65.166.147
CSeq: 102 INVITE
Content-Length: 0


SIPTransaction=> Received Response udp:10.248.58.129:5070<-udp:10.248.58.129:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bKbabe2e9db71342a6a9dd63e4815c0f8d
To: <sip:SS-User@sipsorcery.com>;tag=YfkmOb9pwrHE8kcwqNq1FFMn9NcD42bc
From: "Bob Dole" <sip:1704375XXXX@198.65.166.147>;tag=1316380369
Call-ID: 319b892d037748d6882a377a2208ae50
CSeq: 1 INVITE
Contact: <sip:SS-User@166.137.10.200:35934;transport=UDP>
Content-Length: 0
Proxy-ReceivedFrom: udp:166.137.10.200:35934
Proxy-ReceivedOn: udp:10.248.58.129:5060
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS


DialPlan=> Information response 180 Ringing for sip:SS-User@166.137.10.200:35934;transport=UDP.
SIPTransaction=> Received Response udp:10.248.58.129:5070<-udp:10.248.58.129:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bKbabe2e9db71342a6a9dd63e4815c0f8d
To: <sip:SS-User@sipsorcery.com>;tag=YfkmOb9pwrHE8kcwqNq1FFMn9NcD42bc
From: "Bob Dole" <sip:1704375XXXX@198.65.166.147>;tag=1316380369
Call-ID: 319b892d037748d6882a377a2208ae50
CSeq: 1 INVITE
Contact: <sip:SS-User@166.137.10.200:35934;transport=UDP>
Supported: replaces, 100rel, timer, norefersub
Content-Length: 218
Content-Type: application/sdp
Proxy-ReceivedFrom: udp:166.137.10.200:35934
Proxy-ReceivedOn: udp:10.248.58.129:5060
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS

v=0
o=- 3472238488 3472238489 IN IP4 10.56.239.98
s=pjmedia
c=IN IP4 10.56.239.98
t=0 0
a=X-nat:0
m=audio 4002 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

SIPTransaction=> Send Request udp:10.248.58.129:5070->udp:10.248.58.129:5060
ACK sip:SS-User@166.137.10.200:35934;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.248.58.129:5070;branch=z9hG4bK4e794fa7a27646a98b5787883f2bc3c1
To: <sip:SS-User@sipsorcery.com>;tag=YfkmOb9pwrHE8kcwqNq1FFMn9NcD42bc
From: "Bob Dole" <sip:1704375XXXX@198.65.166.147>;tag=1316380369
Call-ID: 319b892d037748d6882a377a2208ae50
CSeq: 1 ACK
Max-Forwards: 70
Content-Length: 0
Proxy-SendFrom: udp:10.248.58.129:5060


DialPlan=> Response 200 OK for sip:SS-User@166.137.10.200:35934;transport=UDP.
DialPlan=> SDP on UAC response had RTP socket mangled from 10.56.239.98:4002 to 166.137.10.200:4002.
DialPlan=> Cancelling all call legs for ForkCall app.
SIPTransaction=> Send Final Response Reliable udp:10.248.58.129:5070->10.248.58.129:5060
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 10.248.58.129:5060;branch=z9hG4bK63539fac31cc0056bfcee44546d944397675b49a
Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK661.af7480a3.1
Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK661.9f7480a3.0
Via: SIP/2.0/UDP 198.65.166.147:5060;branch=z9hG4bK4b7d4ad3;rport=5060
To: <sip:747253XXXX@198.65.166.131>;tag=1035991471
From: "704375XXXX" <sip:704375XXXX@198.65.166.147>;tag=as751ce8c8
Call-ID: 0fbd818f7dd6e47306c9f71e56eb090e@198.65.166.147
CSeq: 102 INVITE
Contact: <sip:10.248.58.129:5070>
Record-Route: <sip:198.65.166.131;lr;ftag=as751ce8c8>,<sip:198.65.166.131;lr;ftag=as751ce8c8>
Server: www.sipsorcery.com
Content-Length: 220
Content-Type: application/sdp

v=0
o=- 3472238488 3472238489 IN IP4 10.56.239.98
s=pjmedia
c=IN IP4 166.137.10.200
t=0 0
a=X-nat:0
m=audio 4002 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

DialPlan=> Dial command was successfully answered in 8.13s.
DialPlan=> Dialplan trace completed at 11 Jan 2010 14:42:02:411.

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

Post by Aaron » Mon Jan 11, 2010 11:39 pm

Ok confusion is reigning supreme, different networks, sipsorcery installs, devices, it's all too much for my little head.

I think it would make things simpler to stick to the sipsorcery.com server and try and identify the problem with it.

If you don't get audio on your side it most likely means the IP socket in the Ok response from your device is wrong.

The portion of your trace below is showing the response sent to sipgate with the SDP from your phone/device. The ONLY thing the sipsorcery server has done to the SDP is to swap the private IP address it contained, 10.56.239.98, to the public one the sipsorcery.com server received the request from, 166.137.10.200. When one way audio occurs it is usually because the port your device specified to receive audio on, in this case 4002, gets translated by the NAT to a different port and therefore any audio sipgate tries to send it will be rejected. With a double NAT there are double the chances of the port being translated.

DialPlan=> Response 200 OK for sip:SS-User@166.137.10.200:35934;transport=UDP.
DialPlan=> SDP on UAC response had RTP socket mangled from 10.56.239.98:4002 to 166.137.10.200:4002.
DialPlan=> Cancelling all call legs for ForkCall app.
SIPTransaction=> Send Final Response Reliable udp:10.248.58.129:5070->10.248.58.129:5060
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 10.248.58.129:5060;branch=z9hG4bK63539fac31cc0056bfcee44546d944397675b49a
Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK661.af7480a3.1
Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK661.9f7480a3.0
Via: SIP/2.0/UDP 198.65.166.147:5060;branch=z9hG4bK4b7d4ad3;rport=5060
To: <sip:747253XXXX@198.65.166.131>;tag=1035991471
From: "704375XXXX" <sip:704375XXXX@198.65.166.147>;tag=as751ce8c8
Call-ID: 0fbd818f7dd6e47306c9f71e56eb090e@198.65.166.147
CSeq: 102 INVITE
Contact: <sip:10.248.58.129:5070>
Record-Route: <sip:198.65.166.131;lr;ftag=as751ce8c8>,<sip:198.65.166.131;lr;ftag=as751ce8c8>
Server: www.sipsorcery.com
Content-Length: 220
Content-Type: application/sdp

v=0
o=- 3472238488 3472238489 IN IP4 10.56.239.98
s=pjmedia
c=IN IP4 166.137.10.200
t=0 0
a=X-nat:0
m=audio 4002 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

What would be useful is to see a packet capture of a call directly from one of your devices to sipgate over the AT&T network. I'd like to see what it's doing differently to enable the sipgate RTP to be able to get back through the double NAT.

Regards,

Aaron

Post Reply