Menu

#326 Sipsorcery DNS on Mobile data network

WrongConfig
nobody
None
Medium
Defect
2010-10-30
2010-10-30
Anonymous
No

Originally created by: tobias.p...@gmail.com

What steps will reproduce the problem?
1.specify sipsorcery account
2.over wifi it works fine
3.over mobile carrier it it reports a registration error - bad gateway

What is the expected output? What do you see instead?
registration error - bad gateway

What version of the product are you using? On what operating system?
0.0.15 -006 dev

Please provide any additional information below.
running on HTC HERO with Froydvillain 1.5
additionally I got a Voipcheap, a Sipgate and a Gizmo5 account specified and they work perfectly on 3G or HSDPA

Discussion

  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: r3gis...@gmail.com

    Maybe for sipsorcery you need to activate stun... Worth to be tried.
    Some sip servers, such as ekiga - example I well know-, refuse to register with a private url and you need to provide them directly your public IP which is done by STUN.
    So maybe, activating stun will help.

    Else you can try to use the new "record logs" feature available from menu > help. And send me what is happening, maybe the full trace is more verbose about the bad gateway error.
    Or, it's maybe something to see with sipsorcery ... if works well with your other sip provider... no? (Or another thought, maybe your 3G carrier that block sipsorcery domain.... )

     
  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: r3gis...@gmail.com

    Hop, another thought, maybe it's linked to issue 300?

    There is also an open point on sip sorcery forum.
    I've just contacted their support guy to see if there is something we could do together for their users.
    http://forum.sipsorcery.com/viewtopic.php?f=6&t=2897&p=17489#p17489

     

    Related

    Tickets: #300

  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: tobias.p...@gmail.com

    Thanks for your quick reply on this,
    I've seen this thread on the sipsorcery forum, but didn't really relate to it since it seems to work perfectly fine over wifi.
    The interesting part is that it also isn't a mobile provider issue since I had sipdroid running until yesterday with exactly the same settings I am trying to use now with CSIsimple.
    I tried the STUN, using stun01.sipphone.com, didn't work either.
    I also observed that the application is going nuts when I try to register to sipsorcery over 3G or HDSPA, it kind of slows down the entire system.
    I didn't really get worm with the log file extraction, is there a way to limit the log to CSIsipmle only since I find everything in there?

     
  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: tobias.p...@gmail.com

    Thanks for your quick reply on this,
    I've seen this thread on the sipsorcery forum, but didn't really relate to it since it seems to work perfectly fine over wifi.
    The interesting part is that it also isn't a mobile provider issue since I had sipdroid running until yesterday with exactly the same settings I am trying to use now with CSIsimple.
    I tried the STUN, using stun01.sipphone.com, didn't work either.
    I also observed that the application is going nuts when I try to register to sipsorcery over 3G or HDSPA, it kind of slows down the entire system.
    I didn't really get worm with the log file extraction, is there a way to limit the log to CSIsipmle only since I find everything in there?

    may this be the problem:
    10-30 18:17:59.823 D/libpjsip(11483):  18:17:59.823  sip_resolve.c  Failed to resolve 'sipsorcery.com'. Err=70018 (gethostbyname() has returned error (PJ_ERESOLVE))
    10-30 18:17:59.823 W/libpjsip(11483):  18:17:59.824    tsx0x25795c  Failed to send Request msg REGISTER/cseq=56715 (tdta0x2348f0)! err=70018 (gethostbyname() has returned error (PJ_ERESOLVE))
    10-30 18:17:59.823 V/libpjsip(11483):  18:17:59.824    tsx0x25795c  State changed from Null to Terminated, event=TRANSPORT_ERROR
    10-30 18:17:59.823 W/libpjsip(11483):  18:17:59.824    pjsua_acc.c  SIP registration failed, status=502 (gethostbyname() has returned

     
  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: r3gis...@gmail.com

    Ok... so sounds android has not updated his DNS.
    Try to activate DNS SRV in expert settings
    Settings > Network > DNS SRV
    It will use the sip stack to resolve DNS instead of relying on android DNS stack

     
  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: tobias.p...@gmail.com

    Just installed your latest and found out that it doesn't keep the settings when you uninstall the app before installing the new version, a bummer.

     
  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: tobias.p...@gmail.com

    Ok, here we go this is tha 17 version with DNS SRV enabled:

    Account <sip:xxx@sipsorcery.com> added with id 0
    10-30 18:40:54.563 I/libpjsip(11913):  18:40:54.567    pjsua_acc.c  Registration sent
    10-30 18:40:54.573 D/Dialer  (11913): Update chooser choice
    10-30 18:40:54.743 D/dalvikvm(11913): GC_FOR_MALLOC freed 8965 objects / 529464 bytes in 138ms
    10-30 18:40:54.803 D/SIP AccountList(11913): > Need to update list !
    10-30 18:40:56.243 D/libpjsip(11913):  18:40:56.250     resolver.c  Re-transmitting 42 bytes to NS 0 (85.62.229.133:53): DNS SRV query for _sip._udp.sipsorcery.com
    10-30 18:40:57.263 D/SIP HOME(11913): On Resume SIPHOME
    10-30 18:40:57.273 D/SIP HOME(11913): WE CAN NOW start SIP service
    10-30 18:40:57.283 D/Dialer  (11913): Update chooser choice
    10-30 18:40:57.603 D/SIP SRV (11913): Start sip stack because start asked
    10-30 18:40:57.603 D/PreferencesWrapper(11913): We are valid for MOBILE
    10-30 18:40:57.603 I/SIP SRV (11913): Will start sip : false
    10-30 18:40:57.623 D/SIP AccountList(11913): Unbind from service
    10-30 18:40:58.251 D/libpjsip(11913):  18:40:58.251     resolver.c  Re-transmitting 42 bytes to NS 0 (85.62.229.133:53): DNS SRV query for _sip._udp.sipsorcery.com
    10-30 18:40:58.743 D/SIP HOME(11913): On back pressed !
    10-30 18:40:58.753 D/SIP HOME(11913): On back pressed !
    10-30 18:41:00.243 D/libpjsip(11913):  18:41:00.252 _sip._udp.sips  DNS SRV resolution failed for _sip._udp.sipsorcery.com: Operation timed out (PJ_ETIMEDOUT)
    10-30 18:41:00.243 D/libpjsip(11913):  18:41:00.252 _sip._udp.sips  DNS SRV resolution failed for _sip._udp.sipsorcery.com, trying resolving A record for sipsorcery.com
    10-30 18:41:00.243 D/libpjsip(11913):  18:41:00.253 _sip._udp.sips  DNS A record resolution failed: DNS "Server failure" (PJLIB_UTIL_EDNS_SERVFAIL)
    10-30 18:41:00.243 D/libpjsip(11913):  18:41:00.253  sip_resolve.c  DNS A record resolution failed: DNS "Server failure" (PJLIB_UTIL_EDNS_SERVFAIL)
    10-30 18:41:00.253 W/libpjsip(11913):  18:41:00.253    tsx0x37cd24  Failed to send Request msg REGISTER/cseq=19079 (tdta0x3a5420)! err=320052 (DNS "Server failure" (PJLIB_UTIL_EDNS_SERVFAIL))
    10-30 18:41:00.253 D/libpjsip(11913):  18:41:00.253 _sip._udp.sips  DNS SRV resolution failed for _sip._udp.sipsorcery.com: Operation timed out (PJ_ETIMEDOUT)
    10-30 18:41:00.253 D/libpjsip(11913):  18:41:00.254 _sip._udp.sips  DNS SRV resolution failed for _sip._udp.sipsorcery.com, trying resolving A record for sipsorcery.com
    10-30 18:41:00.253 D/libpjsip(11913):  18:41:00.254 _sip._udp.sips  DNS A record resolution failed: DNS "Server failure" (PJLIB_UTIL_EDNS_SERVFAIL)
    10-30 18:41:00.253 D/libpjsip(11913):  18:41:00.254  sip_resolve.c  DNS A record resolution failed: DNS "Server failure" (PJLIB_UTIL_EDNS_SERVFAIL)
    10-30 18:41:00.253 W/libpjsip(11913):  18:41:00.254    tsx0x38df04  Failed to send Request msg REGISTER/cseq=10867 (tdta0x38ccc0)! err=320052 (DNS "Server failure" (PJLIB_UTIL_EDNS_SERVFAIL))
    10-30 18:41:00.253 W/libpjsip(11913):  18:41:00.254    pjsua_acc.c  SIP registration failed, status=503 (DNS "Server failure" (PJLIB_UTIL_EDNS_SERVFAIL))

     
  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: tobias.p...@gmail.com

    I checked the sipsorcery console and the device doesn't even reach sipsorcery, there is no log of any register request of that device at all

     
  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: r3gis...@gmail.com

    The fact that it doesn't reach is absolutely logic regarding the trace you have on CSipSimple traces...
    It doesn't resolve sipsorcery at all. So can't reach it. The question is... why it doesn't resolve... nor android, nor pjsip sip stack...
    Could be cause blacklisted on your carrier DNS :S. But would not explain why it worked with sipdroid previously installed on your phone.
    You can try to use expert wizard (while editing your account use menu choose wizard to switch to another wizard) to replace registrar uri from
    sip:sipsorcery.com to sip:69.59.142.213 : it will avoid dns resolution.

    See then if it goes far than just dns resolution. Should at least try to reach the sipsorcery server.

    For update of new csipsimple dev versions :
    * Indeed there is an open issue about saving account settings.. I know that's not easy for now to be a alpha testor ...
    * If you are already using dev version, you can install it using adb and force the update to keep your settings (there is an option on adb  install -r CSipSimple.apk (it will keep your datas).

     
  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: tobias.p...@gmail.com

    Ok that helped, defining sipsorcery's IP on Realm and Proxy lets me register.
    And here comes the big but ;-)
    CSIsimple registers fine on sipsorcery via udp, but when I define tcp, it seems to register, but I don't receive incoming calls, even though I am able to place calls.

     
  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: tobias.p...@gmail.com

    this actually brings me to another question, regarding this: https://code.google.com/p/sipdroid/wiki/NewStandbyTechnique
    I was wondering whether I could push the timeout limit in CSIPsimple to 3600s and the keep alive to 120s in order to reduce battery impact.
    The timeout is an important reason for the use of TCP, I suppose you implemented TCP for that purpose

     
  • Anonymous

    Anonymous - 2010-10-30

    Originally posted by: r3gis...@gmail.com

    Could be great to test this values. you can read :
    https://code.google.com/p/csipsimple/issues/detail?id=81
    and
    https://code.google.com/p/csipsimple/issues/detail?id=50
    that are also mentioning the link from sipdroid.
    Let me know how it goes. However regarding the sipdroid code, I'm not sure they definitely use what they announce in this wiki page.

    Well, here in csipsimple, you can play with these values. So try it and let me know how it goes.
    I know that on some 3G networks in some countries it has to be reduced (timeout reduce and keep alive increased) to be able to still receive calls after a while (15 minutes for example).

    I didn't get time to really test values and impacts on the battery.
    But if you could test would be nice to share your results so that I could introduce bests results as default values.
    I'm sure that using two account consume more battery than only one ;), that increasing log level also consume more battery, having a sip provider that constantly send Notify or Option also increase.... but I don't know exactly what is the impact of timeouts and keep alive. So would be really interested by tests on this point!

    There is apps that monitor battery and display battery graph. Maybe could be useful to compare result trying to keep scenario as much as possible the same between each test.

    About the first issue you had, if putting IP solve the problem, I think that there is something with DNS of your mobile carrier.
    Still two strange points :
    * that other sip client succeeded, unless they do cache with DNS resolution, (which I think is a bad idea when you have an enterprise ip-pbx).
    * other accounts you have succeed in resolving dns names of other server (which make me think that the DNS is reachable and can resolve other domain names)

    I mark the issue as closed but I keep it in mind. And if somebody else have the same problem, I'll reopen it.
    Keep me in touch about your result on timeout and keep alive. You can put your results on the issue 81 (I think it's the right place about this optimisation)

    Summary: Sipsorcery DNS on Mobile data network
    Status: WrongConfig

     

    Related

    Tickets: #50
    Tickets: #81


Log in to post a comment.