[Freeswitch-users] From header rewrite on B2BUA scenario
Peter Olsson
peter.olsson at visionutveckling.se
Fri Jul 8 09:54:00 MSD 2011
Make sure to set caller-id-in-from to true in the gateway config.
/Peter
----- Reply message -----
Från: "Dave Horton" <dave at dchorton.com>
Datum: fre, jul 8, 2011 06:53
Rubrik: [Freeswitch-users] From header rewrite on B2BUA scenario
Till: "FreeSWITCH Users Help" <freeswitch-users at lists.freeswitch.org>
I have a scenario where I have FS configured so as to take an incoming call and send it out through a configured gateway. Now this gateway does not require authentication, so in my gateway configuration I have the register param set to false:
<gateway name="gwInternal">
<param name="username" value="foo"/>
<param name="password" value="bar"/>
<param name="realm" value="204.215.65.202"/>
<param name="proxy" value="204.215.65.202"/>
<param name="register" value="false"/>
<param name="context" value="public"/>
</gateway>
Now, even though I am not registering to this gateway, FS requires me to provide a username and password or else I get an error when starting/loading this configuration. So you can see above that I have just put in a username of "foo", just to have something there.
Now I come to the problem. The result of the above configuration is that the From header coming in looks like this:
From: <sip:+15083084809 at 204.215.65.201:5060>;tag=3519088051-756100
and the one that FS creates to send out through this gateway looks like this:
From: "+15083084809" <sip:foo at 204.215.65.202;transport=udp>;tag=Sr6taB8rFgt1H
You can see that it has inserted the username of 'foo' in the user part of the uri of the From header.
The reason that this is a problem is that this INVITE is going out to another remote FS, as it turns out. And when the dialed remote extension off that FS PBX does not pick up it then goes into voicemail, and the username of 'foo' is what is stored as the calling number. So when the user on that remote PBX collects that voicemail and tries to do call return, the FS ends up trying to transfer a call to 'foo', which fails. So call return is not working in the remote FS due to this rewriting of the From header.
Is there a way I can configure my FS to send calls out through a gateway and maintain the user part of the From URI that was received on the incoming call? Or, alternatively, can I configure the voicemail application to look for the caller id field from somewhere else than the user part of the From URI ?
Dave
_______________________________________________
Join us at ClueCon 2011, Aug 9-11, Chicago
http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
!DSPAM:4e168bec32761053165832!
More information about the FreeSWITCH-users
mailing list