[SR-Users] Replacing a message body received with a subsequent message sending out of kamailio

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 5 12:51:21 CEST 2017


Hello,


On 31.03.17 09:53, narayan panigrahi wrote:
>
> Hi All,
>
>
> I have a architecture of pjsip,kamailio,freeswitch and one external
> server.
>
> When kamailio is receiving "407"-proxy authentication required from
> the external server it sends to freeswitch and received "407" from
> freeswitch.But when replying back to kamailio the freeswitch is adding
> some extra headers in that "407".
>
> Now I need to send the message from kamailio to pjsip the same thing
> received from external server.So I need to replace the message
> received from external server with the message received from
> freeswitch at kamailio.
>
>
> I am using redis db to store the message.Can anybody help me how to
> configure the kamailio so that it will  replace the message with
> freeswitch message and send the original message received before i.e.
> from external server.
>
> Any suggestion will be highly appreciated.
>
>
you should not send to the device a SIP response that was supposed to go
to FreeSwitch, because there are some headers that must be processed by
FreeSwitch, such as Via. By sending the response to the device, then the
device will have to send it to FreeSwitch.

If you just want to remove some headers added by FreeSwitch, use
remove_hf() in reply_route or onreply_route[x].

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170405/6fb9fcfa/attachment.html>


More information about the sr-users mailing list