[asterisk-bugs] [JIRA] (ASTERISK-22777) pjsip messaging: Investigate in dialog message request test failures; determine correct behavior of in call messaging

Matt Jordan (JIRA) noreply at issues.asterisk.org
Sun Oct 27 18:02:03 CDT 2013


Matt Jordan created ASTERISK-22777:
--------------------------------------

             Summary: pjsip messaging: Investigate in dialog message request test failures; determine correct behavior of in call messaging
                 Key: ASTERISK-22777
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22777
             Project: Asterisk
          Issue Type: Bug
          Components: Resources/res_pjsip_messaging, Tests/testsuite
            Reporter: Matt Jordan


The PJSIP [message_in_dialog|https://bamboo.asterisk.org/bamboo/browse/AST-ATTSCD4-C632TE-83/test/case/1415465] test is failing on bamboo.

The test uses two SIPp scenarios. One creates a call and, upon reception of the 200 OK from Asterisk, sends a SIP MESSAGE request in dialog to Asterisk. The second SIPp scenario expects to receive a call, followed by a SIP MESSAGE request.

However, this doesn't seem to be what {{res_pjsip_messaging}} will do. Upon receiving a SIP MESSAGE request in dialog, it appears as if that module will construct an AST_FRAME_TEXT frame and enqueue that on the existing channel:

{noformat}
static int incoming_in_dialog_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
{
	char buf[MAX_BODY_SIZE];
	enum pjsip_status_code code;
	struct ast_frame f;

	pjsip_dialog *dlg = session->inv_session->dlg;
	pjsip_transaction *tsx = pjsip_rdata_get_tsx(rdata);

        ...

	memset(&f, 0, sizeof(f));
	f.frametype = AST_FRAME_TEXT;
	f.subclass.integer = 0;
	f.offset = 0;
	f.data.ptr = buf;
	f.datalen = strlen(buf) + 1;
	ast_queue_frame(session->channel, &f);

	send_response(rdata, PJSIP_SC_ACCEPTED, dlg, tsx);
	return 0;
}
{noformat}

The problem is, PJSIP channels don't handle text frames. Even if they did, they wouldn't send the text message out as a SIP MESSAGE request - I'm assuming they'd pass that text message down to the RTP engine.

This issue is to figure out what the correct behavior of in dialog MESSAGE request should be, and to implement it in PJSIP. Correspondingly, the test should be updated to reflect the expected behavior.

(And if the reading of the code is wrong, the test is still failing sporadically without indicating much in the Asterisk logs. We should have some DEBUG level message at least that indicate what we did with the MESSAGE request)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list