[SR-Users] Modifying replies in failure route
Daniel-Constantin Mierla
miconda at gmail.com
Thu Jul 29 20:54:48 CEST 2010
On 7/29/10 8:52 PM, Alex Balashov wrote:
> On 07/29/2010 02:51 PM, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> On 7/29/10 4:41 PM, Alex Balashov wrote:
>>> I know failure routes operate relative to the request that failed,
>>> rather than the final reply received per se.
>>>
>>> Nevertheless, is there any way provided by Kamailio/SR at this time to
>>> modify a final reply (say, append a header, or something else
>>> theoretically permissible) prior to its being passed to the
>>> originating UAC?
>> if you need, you can force your own reply with t_reply() from failure
>> route, overwriting any received reply. To that reply you can add headers
>> with append_to_reply()
>
> Aha, thank you - it is append_to_reply() that I was looking for, as I
> am used to failure routes operating on the request, not on the actual
> reply message.
yes, failure_route operates on request and you can add headers to local
generated replies with append_to_reply(). But again, if the reply is
received from downstream you would probably need to use an onreply_route
before to append headers to it.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com/
More information about the sr-users
mailing list