[Kamailio-Users] Modifying the URI in the header From more than once

mayamatakeshi mayamatakeshi at gmail.com
Wed Mar 11 12:52:39 CET 2009


On Wed, Mar 11, 2009 at 8:33 PM, mayamatakeshi <mayamatakeshi at gmail.com> wrote:
> Hello,
> I'm trying to add CallForwarding to my kamailio.cfg.
>
> Before relaying an INVITE from one subscriber to another, I'm required
> to modify the From username to the PSTN number of the caller. So I use
> uac_replace_from and this works fine.
> I can see kamailio sendind this record-route:
>
> Record-Route: <sip:192.168.33.2;lr=on;ftag=qunug47bd1hc74ir26iv;vsf=AAAAAERUW1NLXloEeFVZKRYIDAZKBwRPEQYEH1oLCQAEFS5qcA--;did=b76.5c17ed25>
>
> But then, when the callee fails to answer and failure_route is called,
> I need to modify the From username to the PSTN number of the callee
> before doing the forward. If I simply try to call uac_replace_from
> again inside failure_route, record-route is sent with a duplicate vsf
> parameter like this:
>
> Record-Route: <sip:192.168.33.2;lr=on;ftag=qunug47bd1hc74ir26iv;vsf=AAAAAERUW1NLXloEeFVZKRYIDAZKBwRPEQYEH1oLCQAEFS5qcA--;did=b76.5c17ed25;vsf=AAAAAERUW1NLXloEeFVeKRYIDAZKBwRPEQYEH1oLCQAEFS5qcA-->
>
> And this causes two problems:
> - the message becomes too big and the GW replies with "513 Message too large"
> - the reply is sent back to the caller with duplicate From header and
> some UAs do not acknowledge the reply.

Sorry, I forgot to mention. Calling uac_replace_from inside
failure_route has the above effects but doesn't change the From header
at all.

>
> So, is it possible to modify the From header more than once?
>
> regards,
> takeshi
>




More information about the sr-users mailing list