I am attempting to add a Reason header with Q.850 result codes.
Unfortunately, this does not work:
if (is_method("CANCEL")) { append_hf("Reason: Q.850; cause=16\r\n"); if (t_check_trans()) { t_relay(); } exit; }
If I have to use 3.1.x, does it support sending Q.850 codes?
Jeremy McNamara
Am 15.03.2011 04:31, schrieb Jeremy McNamara:
I am attempting to add a Reason header with Q.850 result codes.
Unfortunately, this does not work:
if (is_method("CANCEL")) { append_hf("Reason: Q.850; cause=16\r\n"); if (t_check_trans()) { t_relay(); } exit; }
AFAIK you can not add headers to the CANCEL request as they are created by tm module based on corresponding INVITE transaction.
There are several functions in tm module to automatically generate Reason headers: http://www.kamailio.org/docs/modules/3.1.x/modules/tm.html#t_set_no_e2e_canc...
A workaround would be stateless forwarding, then you can manipulate the CANCEL as you like.
regards Klaus
If I have to use 3.1.x, does it support sending Q.850 codes?
Jeremy McNamara
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 3/15/11 3:33 AM, Klaus Darilion wrote:
There are several functions in tm module to automatically generate Reason headers: http://www.kamailio.org/docs/modules/3.1.x/modules/tm.html#t_set_no_e2e_canc...
I saw these, but I do not think they help (as I need Q.850 reason codes)
A workaround would be stateless forwarding, then you can manipulate the CANCEL as you like.
Can you provide an example? I am not immediately finding a stateless way to send a CANCEL.
Thank you,
Jeremy McNamara
On 15.03.2011 13:22, Jeremy McNamara wrote:
On 3/15/11 3:33 AM, Klaus Darilion wrote:
There are several functions in tm module to automatically generate Reason headers: http://www.kamailio.org/docs/modules/3.1.x/modules/tm.html#t_set_no_e2e_canc...
I saw these, but I do not think they help (as I need Q.850 reason codes)
A workaround would be stateless forwarding, then you can manipulate the CANCEL as you like.
Can you provide an example? I am not immediately finding a stateless way to send a CANCEL.
Instead of t_relay() use forward(): http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#forward
Note: if you want to forward CANCEL stateless, you also have to forward the INVITE and ACK stateless.
regards Klaus
On 3/15/11 10:25 AM, Klaus Darilion wrote:
Instead of t_relay() use forward(): http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:3.1.x#forward
I thought I would need to use forward. Thank you for the confirmation.
Note: if you want to forward CANCEL stateless, you also have to forward the INVITE and ACK stateless.
I have to believe a stateless situation would be less than optimal.
I presume to support sending Q.850 result codes 'properly', one would have to patch the TM module ?
Jeremy