[Freeswitch-users] Set From User in SIP request

Dušan Dragić dragic.dusan at gmail.com
Sun Jan 11 14:45:09 MSK 2015

Use user_data to get the user variables

Example, where outbound_caller_id_name/number are your did number and
account code (you can use whatever var you want):
<action application="export"
var outbound_caller_id_name)}"/>
<action application="export"
var outbound_caller_id_number)}"/>

For the second part, I'm not aware of of any standard mechanism in fs
to remove the quotes (is your provider really this broken?).
Maybe try with sip_invite_full_from channel var. I haven't tried it,
but based on the name I'm guessing that you'll have to generate a full
From: field including unique tag value (;tag=xxx) manually.

On 11 January 2015 at 02:08, jeremy ardley <jeremy.ardley at gmail.com> wrote:
> Hi,
> I have a DID provider with multiple incoming numbers. I can send outgoing
> calls on particular DID numbers by sending a SIP request with the From
> header formatted as
> From: dddddddddd <sip:dddddddd at sip.provider.com>;tag=yyy
> Where the From name is the DID in full national number form (10 digit) and
> the From user is the 8 digit account number. Each unique DID has a matching
> unique account number.
> I have internal extensions mapped to different DID numbers.
> I need a mechanism to feed different DID number and account number pairs to
> the gateway for each outgoing call. I hope to do  that via the internal
> extension xml files e.g.
> <include>
>   <user id="200">
>     <params>
>       <param name="password" value="xxxxxx"/>
>       <param name="vm-password" value="200"/>
>     </params>
>     <variables>
>       <variable name="toll_allow" value="domestic,international,local"/>
>       <variable name="accountcode" value="200"/>
>       <variable name="user_context" value="default"/>
>       <variable name="effective_caller_id_name" value="Michael J Fox"/>
>       <variable name="effective_caller_id_number" value="200"/>
>       <variable name="outbound_caller_id_name" value="0000000001"/>
>       <variable name="outbound_caller_id_number" value="0000000001"/>
>       <variable name="outbound_caller_from_user" value="01234567"/>
>       <variable name="callgroup" value="techsupport"/>
>     </variables>
>   </user>
> </include>
> The question is how to pass the new variable outbound_caller_from_user to
> the gateway and get it substituted in the user field of the SIP From header?
> I have a secondary issue in that I can set the outbound DID part of the From
> Header but it has quotes around it
> From: "dddddddddd" <sip:dddddddd at sip.provider.com>;tag=yyy
> Which is undesirable and it would be helpful to suppress that in Freeswitch
> itself.
> Thanks,
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
> 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

Dušan Dragić

Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list