[Freeswitch-users] Dial plan variables
Kyle Hunter
khunter at thesummitgroup.com.au
Fri Dec 18 03:28:47 MSK 2015
Thanks ☺
I’ve now found out I’m going to need to use sip_to_display instead.
However I’ve found this weirdness occurring:
<action application="rxfax" data="/var/spool/fax/FAX-${sip_to_display}-${caller_id_number}-${uuid}.tif"/>
<action application="system" data="php /var/www/newfax.php FAX-${sip_to_display}-${caller_id_number}-${uuid}.tif && echo 1"/>
<action application="hangup"/>
When Running the first line the fax gets stored using the correct number:
d1841980-a51a-11e5-891a-4f40b9cf9e3e EXECUTE sofia/external/61344443333 at pbx1pbx.internal rxfax(/var/spool/fax/FAX-61799997777-61344443333-d1841980-a51a-11e5-891a-4f40b9cf9e3e.tif)
But the second line:
d1841980-a51a-11e5-891a-4f40b9cf9e3e EXECUTE sofia/external/61344443333 at pbx1pbx.internal system(php /var/www/newfax.php FAX-61344443333-61344443333-d1841980-a51a-11e5-891a-4f40b9cf9e3e.tif && echo 1)
Is this the expected behaviour?
Thanks
Kyle.
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Jurijs Ivolga
Sent: Wednesday, 16 December 2015 6:33 PM
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
Subject: Re: [Freeswitch-users] Dial plan variables
Hi Kyle,
destination_number is number what is called. If it is for inbound faxes, then destination_number variable will contain number which your clients calls to get into Freeswitch. More details about channel variables you can find below:
https://freeswitch.org/confluence/display/FREESWITCH/Channel+Variables
You can add <action application="info"/> line before <action application="rxfax" ....> and in console you will see all related to that call variables. It will looks like:
2015-12-16 02:20:45.581035 [INFO] mod_dptools.c:1711 CHANNEL_DATA:
Channel-State: [CS_EXECUTE]
Channel-Call-State: [RINGING]
Channel-State-Number: [4]
Channel-Name: [.....]
....
....
....
Caller-Destination-Number: [Value which you are looking for]
....
....
With kind regards,
Jurijs
2015-12-16 8:59 GMT+02:00 Volodymyr Fedorov <lexxua at gmail.com<mailto:lexxua at gmail.com>>:
Hi,
Even variable is not exist you can parse sip-headers and extract variables via regex:
bellow example for parse to-header
<action application="set" data="act_nmbr=${regex(${sip_h_To}|^\<sip:(\d*)\@.*\>.*$|0%1)}"/>
On Wed, Dec 16, 2015 at 1:48 AM, Kyle Hunter <khunter at thesummitgroup.com.au<mailto:khunter at thesummitgroup.com.au>> wrote:
Hey,
I’ve currently got a dial plan set up to receive faxes which looks like:
<action application="rxfax" data="/var/spool/fax/FAX-${destination_number}-${caller_id_number}-${uuid}.tif"/>
I’m just wondering what $destination_number variable is set to. In our SIP Header we’re sending a different ‘SIP Display info’ to what this variable is set to and I can’t seem to find what that variable is actually looking at.
Thanks,
Kyle
Kyle Hunter | Network Engineer | The Summit Group
E: khunter at thesummitgroup.com.au<mailto:khunter at thesummitgroup.com.au> | W:
The Summit Group (Australia) Pty Ltd | P: | Level 1, 39 Railway Road, Blackburn VIC 3130
The Summit Group (USA) LLC | P: 321 216 3844<tel:321%20216%203844> | Suite 1003, 364E Main Street, Middletown DE 19709
Postal: P.O. Box 3225, Doncaster East VIC 3109
Follow us on Facebook<http://www.facebook.com/thesummitgroup/> | LinkedIn<http://www.linkedin.com/company/1942329> | Twitter<http://twitter.com/summitgroupau/>
Kyle Hunter | Network Engineer | The Summit Group
E: khunter at thesummitgroup.com.au<mailto:khunter at thesummitgroup.com.au> | W:
The Summit Group (Australia) Pty Ltd | P: | Level 1, 39 Railway Road, Blackburn VIC 3130
The Summit Group (USA) LLC | P: 321 216 3844 | Suite 1003, 364E Main Street, Middletown DE 19709
Postal: P.O. Box 3225, Doncaster East VIC 3109
Follow us on Facebook<http://www.facebook.com/thesummitgroup/> | LinkedIn<http://www.linkedin.com/company/1942329> | Twitter<http://twitter.com/summitgroupau/>
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org<mailto: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<mailto: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
--
Best regards,
Volodymyr
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org<mailto: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<mailto: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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20151218/967ba7ac/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list