2007/3/14, Francesco Lamonica <[EMAIL PROTECTED]>:
> Hi, i am starting to develop with sofia-sip and was experimenting a bit with
> the sip options example i found on the wiki.
>
> i modified the example in order to send REGISTER and used a loop like this
> to gather the proxy responses:
>
>
>    while(1)
>    {
>      Sleep(1000);
>      send_message (nua); //sends a REGISTER message
>    /* Run event loop */
>    //su_root_run (root);
>    su_root_step (root,200);
>    }
>
> the REGISTERs are correctly sent and i can see with wireshark that the 200
> are getting back to me but the callback is never called
>
> i have been told on the irc channel that i should have allowed REGISTER in
> the nua set params and thus i did:
>
> nua_set_params(nua,
>                                    //NUTAG_EARLY_MEDIA(1),
>
>                                    NUTAG_AUTOANSWER(0),
>                                    NUTAG_PROXY("sip: 192.168.23.21:4000"),
>                                    NUTAG_AUTOALERT(0),
>                                    NUTAG_ALLOW("REGISTER"),
>                                    NUTAG_ALLOW("REFER"),
>                                    NUTAG_ALLOW("INFO"),
>                                    TAG_END());
>
>
> but with no result
>
> any suggestion?

Your loop sends a new register every timeit calls send_message()?

I'd do it like

send_register(nua);

for (registered = 0; !registered;)  {
  su_root_step(root);
}

and change registered to 1 if REGISTER succeeds and to -1 if it fails.
Or store SIP response code there.

-- 
Pekka.Pessi mail at nokia.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to