hi,
   I followed the same steps as mentioned by you but problem dint get
ressolved.I am getting "DNS Error message" with status 503 in the
callback.
and couldn't find the reason for this.Have you tried registering to
public SIP providers like ekiga,iptel etc.with this code ?.Can u tell
me some public SIP providers which supports better testing of
useragents ?? Pls help me on this...
Am using sofia-sip-1.12.9pre10rc2 on s60 platform using s60openC
plugin and connecting to net using gprs. Here is the code snippet
after making few changes :

void app_callback(nua_event_t   event,
                  int           status,
                  char const   *phrase,
                  nua_t        *nua,
                  nua_magic_t  *magic,
                  nua_handle_t *nh,
                  nua_hmagic_t *hmagic,
                  sip_t const  *sip,
                  tagi_t        tags[])
{
      printf("event %d: %03d %s\n",
             event,
             status,
             phrase);

    tl_print(stdout, "", tags);
    break;
  }
} /* app_callback */



int main(int argc,char** argv)
{

    sip_addr_t *from,*to;
        url_string_t *r_uri;
        
        /* Application context structure */
        application appl[1] = {{{{(sizeof appl)}}}};

        /* initialize system utilities */
        su_init();

        /* initialize memory handling */
        su_home_init(appl->home);

        /* initialize root object */
        appl->root = su_root_create(appl);

        //su_root_threading(appl->root, 0);
        
        if (appl->root != NULL)
        {

        /* create NUA stack */
        appl->nua = nua_create(appl->root,app_callback,appl,
                                                
                                 SIPTAG_FROM_STR("sip:[EMAIL PROTECTED]"),
                                
                                 NUTAG_URL("sip:117.97.73.41:5060"),
                        
                               TAG_NULL());
                        
        if (appl->nua != NULL) {

        nua_handle_t *nh;

        to = sip_to_make(appl->home, "sip:[EMAIL PROTECTED]");
        from = sip_to_make(appl->home, "sip:[EMAIL PROTECTED]");
        
        if (to == NULL || from == NULL) {
          return 0;
    }

        sip_aor_strip(to->a_url);
        sip_aor_strip(from->a_url);

        nh = nua_handle(appl->nua, 
NULL,SIPTAG_FROM(from),SIPTAG_TO(to),TAG_END());

        nua_register(nh,
NUTAG_M_DISPLAY("xxx"),NUTAG_M_USERNAME("xxx"),NUTAG_CALLEE_CAPS(0),
SIPTAG_EXPIRES_STR("10000"),TAG_END());
        
    /* enter main loop for processing of messages */
    su_root_run(appl->root);

    /* destroy NUA stack */
    nua_destroy(appl->nua);

        }


        /* deinit root object */
        su_root_destroy(appl->root);
        appl->root = NULL;
        
        }

        /* deinitialize memory handling */
        su_home_deinit(appl->home);

        /* deinitialize system utilities */
        su_deinit();

        return 0;
}


On Thu, Dec 4, 2008 at 10:49 PM, Inca Rose <[EMAIL PROTECTED]> wrote:
> Hi;
> I did not add any NUTAG_REGISTER to my register request,
> I think sofia can take the domain part for the req-uri from the To/From
> headers.
> Check the following code:
> // Sends register to the server
> sip_addr_t *from, *to;
> url_string_t *r_uri;
>
> to = sip_to_make(home, "sip:[EMAIL PROTECTED]");
>
> from = sip_from_make(home, "sip:[EMAIL PROTECTED]");
> sip_aor_strip(to->a_url);
> sip_aor_strip(from->a_url);
> regHandle = nua_handle(nuaHandle,
> magic, // SipAccount object for callback
> SIPTAG_FROM(from), // who is sending REGISTER?
> SIPTAG_TO(to), // whom we are sending REGISTER?
> TAG_END());
>
> if (regHandle) {
> nua_register(regHandle,
> NUTAG_M_DISPLAY("Inca Rose"),
>           NUTAG_M_USERNAME("inca"),
>           NUTAG_CALLEE_CAPS(0),
> SIPTAG_EXPIRES_STR("3600"),
> TAG_END());
> }
>
> On Dec 4, 2008, at 6:51 PM, arun sreedhara wrote:
>
> I am getting the message as "service unavailable"  with status as 503.
> In the ekiga site , its mentioned that the registrar is "ekiga.net"
> and i have tried to using NUTAG_REGISTRAR("sip:ekiga.net"), in this
> case am receiving "DNS Error" message with status 503.I have been
> trying with different SIP providers like  sipcenter.com and iptel.org
> but getting same messages with all of them.I have used ping command on
> ekiga.net to get the ip address and am using this ip address in
> NUTAG_PROXY() also. If i dont specify the proxy address the "DNS
> Error" with status 503 is being received.Is this bz the ip address
> used is not valid ??. I have been looking for free SIP providers where
> i could test my applications,so Is ekiga.net better for testing
> purpose or can u suggest me SIP providers which i can use for testing
> ?
>
>
> On Thu, Dec 4, 2008 at 1:48 PM, Pekka Pessi <[EMAIL PROTECTED]> wrote:
>
> 2008/12/3 arun sreedhara <[EMAIL PROTECTED]>:
>
>  I have tried using 1.12.9pre10rc1, but the problem still persists.
>
> Am trying this on top of S60Openc plugin,and do I need to some
>
> configuration before trying on phones ?? Is the data provided in the
>
> code sufficient for SIP registration ??
>
> Your code does not show nua_authenticate(), perhaps that one is
>
> missing? What is the "service unavailable message" that you get?
>
> --
>
> Pekka.Pessi mail at nokia.com
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Sofia-sip-devel mailing list
> Sofia-sip-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
>
>

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to