[SR-Users] Copy reason field from 503 to 500.
Vitaliy Aleksandrov
vitalik.voip at gmail.com
Fri Apr 27 09:32:05 CEST 2012
According to
"http://www.asipto.com/pub/kamailio-devel-guide/#c02message_processing"
all replies comes to on_reply and if it is negative reply it will be
processed in failure_route after onreply_route.
But that is not the point i tried failure_route too.
append_hf works great for forwarded replies. But as i understand when
kamailio receives final 503 reply it sends 500 reply generated by
"build_res_buf_from_sip_req" (it is part of tm code, not dialplan function).
Thanks for your tries to help.
> ||Well 5xx error codes are processed in failure_route and not
> onreply_route. Not sure though if you can append_hf there.. Give it a try.
>
> FYI, for using a function in event_route (seems not possible for
> append_hf):
>
> event_route[tm:local-request] {
> ...
> append_hf(...);
> ...
> }
>
>
> Reda
>
> On 26 avr. 2012, at 18:10, Vitaliy Aleksandrov <vitalik.voip at gmail.com
> <mailto:vitalik.voip at gmail.com>> wrote:
>
>> I have tried to use "append_hf" in onreply_route.
>> How can i use it in local-request ? According to documentation it can
>> be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE.
>>
>> Sorry forgot to mention that kamailio version is 3.0.2, but i have
>> looked at t_repy.c (tm module from 3.2) and didn't find any changes
>> which can help me.
>>
>>> Hi,
>>>
>>> In which route did you try append_hf ?
>>> "event_route[tm:local-request]" is the route executed for locally
>>> generated requests, I think you should be trying to modify it there.
>>>
>>> Reda
>>>
>>>
>>>
>>> On Thu, Apr 26, 2012 at 16:10, Vitaliy Aleksandrov
>>> <vitalik.voip at gmail.com <mailto:vitalik.voip at gmail.com>> wrote:
>>>
>>> Hi all,
>>>
>>> I have Kamailio connected to PSTN gateway.
>>>
>>> Sometimes gateway replies with "503 temporary unavailable". PSTN
>>> gateway adds a "reason" header with ISUP code.
>>> But according to RFC 3261 <tel:3261> kamailio doesn't forward
>>> 503 replies transparently. When 503 reply is received Kamailio
>>> replaces 503 with a 500 which is created from original request
>>> (build_res_buf_from_sip_req).
>>> I have tried append_hf from textops module, but it's not working
>>> with a locally generated replies.
>>>
>>> How can i copy Reason header from 503 to 500 ?
>>>
>>>
>>> I will appreciate your help with this situation.
>>>
>>> Best regards,
>>> Vitaliy Aleksandrov.
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
>>> mailing list
>>> sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120427/23f13d22/attachment-0001.htm>
More information about the sr-users
mailing list