[asterisk-dev] PJSIP in dialog OPTIONS method handling
Yaron Nachum
nachum.yaron at gmail.com
Thu Apr 10 00:56:58 CDT 2014
Hi Mathew,
I wasn't aware that some of you are listening to both lists. Sorry for that
:-(
BTW - I got spam messages from you dev list.
Regrading the issue - I will open a ticket shortly.
While waiting for an answer I was looking at your PJSIP module supplement
documentation, and I thought I might try to do it there. After playing with
it, and looking at other modules to see how to send a response, I managed
to do it and it seems to work fine. Could anyone please look at it and
verify that I am not doing anything wrong? Below you can see the handler
module (I registered it against incoming OPTIONS requests).
static int options_incoming_request(struct ast_sip_session *session,
pjsip_rx_data *rdata)
{
pjsip_tx_data *tdata;
pj_status_t status;
pjsip_response_addr res_addr;
status = ast_sip_create_response(rdata, 200, NULL, &tdata);
if (status != PJ_SUCCESS) {
ast_log(LOG_ERROR, "Unable to create response (%d)\n",
status);
return status;
}
/* Get where to send request. */
status = pjsip_get_response_addr(tdata->pool, rdata, &res_addr);
if (status != PJ_SUCCESS) {
ast_log(LOG_ERROR, "Unable to get response address
(%d)\n", status);
return status;
}
status = ast_sip_send_response(&res_addr, tdata,
ast_pjsip_rdata_get_endpoint(rdata));
return PJ_TRUE;
}
Thanks,
Yaron.
On Wed, Apr 9, 2014 at 5:04 PM, Matthew Jordan <mjordan at digium.com> wrote:
>
>
>
> On Wed, Apr 9, 2014 at 8:49 AM, Yaron Nachum <nachum.yaron at gmail.com>wrote:
>
>> Hi,
>> Anyone has a workaround?
>>
>>
>> On Tue, Apr 8, 2014 at 9:17 PM, Yaron Nachum <nachum.yaron at gmail.com>wrote:
>>
>>> Hi everyone,
>>> I am running asterisk with release 12.1.0.rc3 and PJSIP.
>>> I have a peer which sends OPTIONS method for session keep-alive, and the
>>> asterisk is not responding to it. That of course disconnects the call after
>>> a few minutes.
>>>
>>> Is there a settings in the PJSIP.conf to respond to in dialog OPTIONS
>>> method? Looking at the documentation I haven't seen it. Does anybody know a
>>> workaround?
>>>
>>> Thanks,
>>> Yaron.
>>>
>>>
>>>
>>
>>
> Please don't cross post between lists. People who read asterisk-dev also
> read asterisk-users. Posting to both lists is not needed, nor is it
> appreciated - those of us who have to read and keep up with a lot of e-mail
> on all of the mailing lists really don't need extra.
>
> There isn't a workaround. If the PJSIP stack isn't responding to an
> in-dialog OPTIONS request when it should be, that's probably a bug. Please
> go ahead and open a bug at issues.asterisk.org. You should include a
> debug log (generated via the instructions on the Asterisk wiki) with pjsip
> debugging enabled.
>
> Thanks -
>
> Matt
>
> --
> Matthew Jordan
> Digium, Inc. | Engineering Manager
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> Check us out at: http://digium.com & http://asterisk.org
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140410/55aadd99/attachment.html>
More information about the asterisk-dev
mailing list