Check and add this in libsofia-sip-ua/sresolv/sres.c

#ifdef IOS_BUILD
#include <resolv.h>
#endif


...

static
sres_config_t *sres_parse_resolv_conf(sres_resolver_t *res,
                                      char const **options)
{
  sres_config_t *c = su_home_new(sizeof *c);

  if (c) {
    FILE *f;
    int i;

    f = fopen(c->c_filename = res->res_cnffile, "r");

    sres_parse_config(c, f);

    if (f)
      fclose(f);

#if HAVE_WIN32
    /* note: no 127.0.0.1 on win32 systems */
    /* on win32, query the registry for nameservers */
    if (sres_parse_win32_ip(c) == 0 || sres_parse_win32_reg(c) == 0)
      /* success */;
    else
      /* now what? */;
#else

#ifdef IOS_BUILD
        if ((_res.options & RES_INIT) == 0) {
                res_init();
        }
        for (i = 0; i < _res.nscount; i++) {
                char* pDNS = inet_ntoa(_res.nsaddr_list[i].sin_addr);
                if (pDNS) {
                        sres_parse_nameserver(c, pDNS);
                }
        }
#endif /* IOS_BUILD */

    /* Use local nameserver by default */
        if (c->c_nameservers[0] == NULL)
                sres_parse_nameserver(c, "127.0.0.1");
#endif




On 11/17/13, 9:39 PM, "Andreas Wehrmann" <[email protected]> wrote:

>
>On 11/18/2013 12:12 AM, Huang, Kun-Yao wrote:
>> Try binding to a specific interface instead of 0.0.0.0. Sofia SIP
>>chooses an arbitrary interface for out-going requests when you bind to
>>0.0.0.0
>>
>> 
>>http://www.mail-archive.com/[email protected]/msg0442
>>7.html
>> 
>>http://www.mail-archive.com/[email protected]/msg0318
>>5.html
>>
>> Kun-Yao Huang
>>
>>
>
>I don't have any experience with iOS, but how about resolving the DNS
>manually and then
>use the resolved address with Sofia?
>I know this is ugly...
>
>Regards,
>Andreas
>
>
>--------------------------------------------------------------------------
>----
>DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>Free app hosting. Or install the open source package on any LAMP server.
>Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktr
>k
>_______________________________________________
>Sofia-sip-devel mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to