Hi,

I would need to send a PUBLISH packet with Sofia, and since I am using 
nta_agent to receive packets, I wanted to reuse it.

 

I used the following piece of code. It compiles, but I believe I did some dumb 
mistake with parameters, but I didn't find any example about PUBLISH, I am not 
even sure if I can do what I need with only nta...

 

nta_leg_t *pub_leg;

      pub_leg = nta_leg_tcreate(agent,

                                            NULL, NULL,

                                            
SIPTAG_CALL_ID_STR(qos->filter->callid),

                                            SIPTAG_FROM_STR("sip:[EMAIL 
PROTECTED]:5066"),

                                            SIPTAG_TO_STR("sip:[EMAIL 
PROTECTED]:5068"),

                                            TAG_END());

 

      nta_outgoing_t *publish;

      publish = nta_outgoing_tcreate(pub_leg, NULL, (nta_outgoing_magic_t *) 
root, NULL,

                                                   SIP_METHOD_PUBLISH, NULL, 
NULL, 0,

                                                      
SIPTAG_MAX_FORWARDS_STR("70"),

                                                      SIPTAG_TO_STR("sip:[EMAIL 
PROTECTED]:5068"),

                                                      
SIPTAG_FROM_STR("sip:[EMAIL PROTECTED]:5066"),

                                                      
SIPTAG_CALL_ID_STR(qos->filter->callid),

                                                      SIPTAG_CSEQ_STR("1 
PUBLISH"),//get a real number

                                                      SIPTAG_ALLOW_STR("INVITE, 
CANCEL, BYE, ACK, PUBLISH"),

                                                      
SIPTAG_EVENT_STR("vq-rtcpxr"),

                                                      
SIPTAG_ACCEPT_STR("application/sdp, message/sipfrag"),

                                                      
SIPTAG_CONTENT_TYPE_STR("application/vq-rtcpxr"),

                                                      
SIPTAG_CONTENT_LENGTH_STR(buf),

                                                      
SIPTAG_PAYLOAD_STR(message),

                                                   TAG_END());

 

      nta_outgoing_destroy(publish);

 

I get an Assertion 'su_port_own_thread(self)' failed when I call 
nta_outgoing_tcreate.

 

I hope someone could help me.

Thank you anyway.

 

Diego Costantini

 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.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