If you're wanting to add the variable to the outbound leg you'll need to set it in {} on the bridge line.

<action application="bridge" data="{sip_h_P-Charge-Info=${accountcode}}sofia/gateway/NP/$1"/>

/b

On Wed, Oct 5, 2022 at 4:28 AM Aina Mestre <aina.mestre@airenetworks.es> wrote:

Good morning,

 

I defined in my directory (/usr/local/freeswitch/conf/directory) a variable called accountcode (it’s okey if it has to be another name because this is already in use) with value 7777. What I need is that in the dialplan is set as a variable so that i can use it as a SIP_Header for my call as sip-h-P-Charge-Info, like follows:

 

 

<extension name="saliente">

     <condition field="destination_number" expression="^(\d+)$" break="on-true">

      <action application="set" data="effective_caller_id_number=${caller_id_number}"/>

      <action application="set"><![CDATA[sip_h_P-Charge-Info=${accountcode}]]></action>

      <action application="bridge" data="sofia/gateway/NP/$1"/>

     </condition>

    </extension>

 

Is it that posible? How can I solve it?

 

Thank you in advance

 

 

 

 

 

 

 

 

 

 

 

 

 

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com


--

Brian West | Co-founder and Developer

Need Commercial support? email sales@freeswitch.com

FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045

Email: brian@freeswitch.com

Mobile: 918-424-9378

Website: https://www.FreeSWITCH.com

https://www.facebook.com/signalwireinc?src=email https://twitter.com/freeswitch