[Freeswitch-users] From header in SIP DID calls
Bruckner Andreas (OeRK-W)
Andreas.Bruckner at w.roteskreuz.at
Fri Jun 20 14:38:49 MSD 2014
Hey guys,
we have two freeswitch instances running, connected to each other via a gateway configuration (without registering).
The scenario is the following:
[ SIP phone 1 ] <==> [ freeswitch1 ]
extension 1000 ^
|
v
[ SIP phone 2 ] <==> [ freeswitch2 ]
extension 1000
The gateway config looks as follows:
<gateway name="freeswitch2">
<param name="username" value="1005"/>
<param name="password" value="1234"/>
<param name="realm" value="<IP of freeswitch 2>"/>
<param name="register" value="false"/>
<param name="caller-id-in-from" value="true"/>
</gateway>
For phone 1, to reach phone 2 there is an extension 881000, forwarding the call via the gateway to freeswitch 2. Phone 2 can reach phone 1 via 991000.
The extension configuration is
<extension name="freeswitch2-outbound">
<condition field="destination_number" expression="^88(\d{4})$">
<action application="set" data="effective_caller_id_number=99${caller_id_number}"/>
<action application="set" data="effective_caller_id_name=FS1 ${caller_id_number}"/>
<action application="bridge" data="sofia/gateway/freeswitch2/$1"/>
</condition>
</extension>
On the opposite side, the extension in the public context is
<extension name="public_extensions">
<condition field="destination_number" expression="^(10[01][0-9])$">
<action application="transfer" data="$1 XML default"/>
</condition>
</extension>
and the extension bridging the call to the phone in the default context is
<extension name="extension1000">
<condition field="destination_number" expression="^1000$">
<action application="info" />
<action application="bridge" data="user/1000"/>
</condition>
</extension>
What we want to achieve is that when 1000 at freeswitch1 calls 1000 at freeswitch2 (by dialing extension 881000), phone 2 should display "FS1 1000" and calling back shoud call 991000 at freeswitch1.
However, phone 2 displays "Extension 1005" and the SIP From field contains 1005@<IP of freeswitch 1> instead of the expected 991000@<IP of freeswitch 1>
We captured the network traffic between the gateways and between freeswitch2 and phone 2 and discovered that the SIP From field is set correctly between freeswitch1 and freeswitch2 (991000@<IP of freeswitch 1>), but is set to 1005@<IP of freeswitch2> between freeswitch2 and phone 2. Where does this happen and what do we have to change in the configuration in order to prevent freeswitch2 from changing this?
Thanks in advance
Andreas
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list