Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Generate a new variable to reference in dialplan


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
aina.mestre at airenet...
Guest





PostPosted: Wed Oct 05, 2022 4:32 am    Post subject: [Freeswitch-users] Generate a new variable to reference in d Reply with quote

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




Back to top
brian at freeswitch.com
Guest





PostPosted: Wed Oct 05, 2022 8:02 am    Post subject: [Freeswitch-users] Generate a new variable to reference in d Reply with quote

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 (aina.mestre@airenetworks.es)> wrote:

Quote:

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 (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 (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 (sales@freeswitch.com)
FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045
Email: brian@freeswitch.com (brian@freeswitch.com)
Mobile: 918-424-9378
Website: https://www.FreeSWITCH.com
[/url] [url=https://twitter.com/freeswitch]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services