Hi, I want my UA to receive a SUBSCRIBE from the server. My INVITE sending code looks like this:
nua_handle_t *handle; handle = nua_handle (nua, NULL, SIPTAG_TO_STR (dest), SIPTAG_FROM_STR ("sip:c...@192.168.114.211:5070"), SIPTAG_CONTACT_STR ("sip:c...@192.168.114.211:5070"), SIPTAG_ALLOW_EVENTS_STR ("x-com-nice-imm-call-state"), TAG_END ()); nua_invite (handle, NUTAG_MEDIA_ENABLE (0), TAG_END ()); I am getting OK response and am able to sent back the ACK but Sofia-SIP sends a "489 Bad Event" when the SUBSCRIBE comes. My event callback does not get called. I tried calling nua_notifier on the handle before the call to nua_invite but that did now help. Any idea what should be done? Is it mandatory that the CSeq of the SUBSCRIBE should match the CSeq of the INVITE. The SIP server I am testing with is sending a different CSeq, but the Call-ID is the same. Thank you, -- Vijay On Thu, Apr 15, 2010 at 4:40 PM, Vijay Mathew <vijay.the.sche...@gmail.com> wrote: > Thanks Walid, Your code is working for me! > > Thanks again, > > -- Vijay > > On Thu, Apr 15, 2010 at 2:26 PM, Walid Salhi <salhi.wali...@gmail.com> wrote: >> Hi Vijay >> Sorry I have made a mistake: The NUTAG_URL is used with nua_create () to >> specify the address of the local user agent >> To set the address of the remote user agent to which you want to send a >> request you can use the NUTAG_URL or SIPTAG_TO (SIPTAG_TO_STR with url given >> as string ) tags with the nua_handle () >> Since, I have no time and no experience with the C++, I have attached a >> simple example with the C language which I have made early. >> You can try it : >> Compile th code and then open a terminal and type >> $ ./user-agent sip:127.0.0.1:5060 >> then open a second terminal and type: >> $./user-agent sip:127.0.0.1:5062 sip:127.0.0.1:5060 >> On Thu, Apr 15, 2010 at 5:14 AM, Vijay Mathew <vijay.the.sche...@gmail.com> >> wrote: >>> >>> Hi Walid, >>> >>> Thanks for the reply. The NUTAG_URL did not work for me. When I pass >>> something like: 127.0.0.1:5060, I get the following runtime error: >>> >>> nta: 127.0.0.1:5060: invalid bind URL >>> nua: initializing SIP stack failed >>> >>> If I specify the URL as sip:127.0.0.1:5060, I get a different error: >>> >>> nta: bind(127.0.0.1:5060;transport=*): No such file or directory >>> nua: initializing SIP stack failed >>> >>> I tried to specify the transport, to no avail. >>> >>> Any more information that might help me? I have attached the code >>> that I am working on. >>> >>> Thank you, >>> >>> -- Vijay >>> >>> On Thu, Apr 15, 2010 at 1:22 AM, Walid Salhi <salhi.wali...@gmail.com> >>> wrote: >>> > The server URL and port are passed to nua_create() with the NUTAG_URL >>> > tag >>> > nua_create(root, /* Event loop */ >>> > event_callback, /* Callback for processing events */ >>> > NULL, /* Additional data to pass to callback */ >>> > NUTAG_URL(argv[1]), /* Address to bind to */ >>> > ................................ /* >>> > tags >>> > as necessary */ >>> > TAG_END()); /* Last tag should always finish the >>> > sequence >>> > */ >>> > On Wed, Apr 14, 2010 at 12:25 PM, Vijay Mathew >>> > <vijay.the.sche...@gmail.com> >>> > wrote: >>> >> >>> >> Hi, >>> >> >>> >> I want to create a simple SIP client that will do the following >>> >> interactions with an existing SIP server: >>> >> >>> >> client server >>> >> >>> >> INVITE ============> >>> >> <=========== 200 OK >>> >> ACK ============> >>> >> <============ SUBSCRIBE >>> >> 200 OK =============> >>> >> NOTIFY =============> >>> >> <============= 200 OK >>> >> BYE ==============> >>> >> <============== 200 OK >>> >> >>> >> I started with the tutorial, but I am not able to connect to the sip >>> >> server. How is the server URL and port passed to nua_create() ? >>> >> >>> >> Thanks, >>> >> >>> >> -- Vijay >>> >> >>> >> >>> >> >>> >> ------------------------------------------------------------------------------ >>> >> Download Intel® Parallel Studio Eval >>> >> Try the new software tools for yourself. Speed compiling, find bugs >>> >> proactively, and fine-tune applications for parallel performance. >>> >> See why Intel Parallel Studio got high marks during beta. >>> >> http://p.sf.net/sfu/intel-sw-dev >>> >> _______________________________________________ >>> >> Sofia-sip-devel mailing list >>> >> Sofia-sip-devel@lists.sourceforge.net >>> >> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel >>> > >>> > >> >> > ------------------------------------------------------------------------------ _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel