[pjsip] Help needed in getting 100 Trying or 200 OK to be sent out in INVITE messages.

Muthusamy, Balamurugan bmuthusa at qualcomm.com
Thu Aug 27 05:41:20 EDT 2009

Hi I have an incoming INVITE and when I do the exact procedure as suggested in page 78 of the pjsip-dev-guide document, I can't seem to be ablel to get the 100 Trying or 180 Ringing or the 200 OK to be sent out.  It seems to be buffered in the system, but does not get sent out at all.

For this exact same endpoint, I already have an outgoing INVITE also.  Basically the outoing INVITE and the incoming INVITE (and outgoing 100 Triying and 200 Oks) share the endpoint.  So, is this the reason thjat the newer session does not have any packets transmitted out?

Here is the output logs:
02:31:18.725 sip_endpoint.c  Processing incoming message: Request msg INVITE/cseq=1 (rdata0x791498)
 02:31:18.725    tsx0x7b8108  Transaction created for Request msg INVITE/cseq=1 (rdata0x791498)
 02:31:18.725    tsx0x7b8108  Incoming Request msg INVITE/cseq=1 (rdata0x791498) in state Null
 02:31:18.725    tsx0x7b8108  State changed from Null to Trying, event=RX_MSG
 02:31:18.725    dlg0x7b78f8  Transaction tsx0x7b8108 state changed to Trying
 02:31:18.725    dlg0x7b78f8  UAS dialog created
 02:31:18.725    dlg0x7b78f8  Module mod-simpleua added as dialog usage, data=(nil)
 02:31:18.725    dlg0x7b78f8  Session count inc to 1 by mod-simpleua
 02:31:18.725       endpoint  Response msg 100/INVITE/cseq=1 (tdta0x7b8870) created
 02:31:18.725    dlg0x7b78f8  Sending Response msg 100/INVITE/cseq=1 (tdta0x7b8870)
 02:31:18.725    tsx0x7b8108  Sending Response msg 100/INVITE/cseq=1 (tdta0x7b8870) in state Trying
02:31:18.725  sip_resolve.c  Target '' type=UDP resolved to '' type=UDP (UDP transport)
 02:31:18.725    tsx0x7b8108  State changed from Trying to Proceeding, event=TX_MSG
 02:31:18.725    dlg0x7b78f8  Transaction tsx0x7b8108 state changed to Proceeding

The source code line is (in the on_rx_request):
                    // Process incoming INVITE!
                    pjsip_transaction *tsx;
                    pjsip_tx_data *tdata;
                    struct app_dialog *app_dlg;
                    pj_status_t status;
                    // Create, initialize, and register new dialog for incoming INVITE.
                    // This also implicitly create UAS transaction for rdata.
                    status = pjsip_dlg_create_uas( pjsip_ua_instance(), rdata, NULL, &_dlg);
                    // Register application as the only dialog usage
                    status = pjsip_dlg_add_usage( _dlg, &mod_simpleua, NULL );
                    // Increment session.
                    pjsip_dlg_inc_session(_dlg, &mod_simpleua);
                    // Create 100/Trying response
                    status = pjsip_dlg_create_response( _dlg, rdata, 100, NULL /*Trying*/, &tdata);
                    // Send 100 response statefully. A transaction will be created in &tsx.
                    status = pjsip_dlg_send_response( _dlg, pjsip_rdata_get_tsx(rdata), tdata);
                    // As in real application, normally we will send 200/OK later,
                    // when the user press the <93>Answer<94> button. In this example, we<92>ll send
                    // 200/OK in answer_dlg() function which will be explained later. In order
                    // to do so, we must <93>save<94> the INVITE transaction. We do this by putting
                    // the transaction instance in dialog<92>s module data at index application
                    // module<92>s ID.
//                    _dlg->mod_data[app_module.id] = pjsip_rdata_get_tsx(rdata);

                    // Done processing INVITE request
                    packet->_id      = userName;
                    packet->_msgType = SLGSPACE::SIP_INVITE;

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090827/f51a0f1a/attachment.html>

More information about the pjsip mailing list