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:
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.
So, is it possible to modify the From header more than once?
regards, takeshi
On Wed, Mar 11, 2009 at 8:33 PM, mayamatakeshi mayamatakeshi@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:
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
2009/3/11 mayamatakeshi mayamatakeshi@gmail.com:
So, is it possible to modify the From header more than once?
AFAIR there are various issues when doing it. You should avoid it for now. Instead, try adding P-Asserted-Identity header to set the caller-ID when routing the request to a PSTN gateway.
On Thu, Mar 12, 2009 at 12:39 AM, Iñaki Baz Castillo ibc@aliax.net wrote:
2009/3/11 mayamatakeshi mayamatakeshi@gmail.com:
So, is it possible to modify the From header more than once?
AFAIR there are various issues when doing it. You should avoid it for now. Instead, try adding P-Asserted-Identity header to set the caller-ID when routing the request to a PSTN gateway.
Thanks, I'll check our GWs.