<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 11:28:48 Friday, 18 December 2015 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.ImprintUniqueID {
        MARGIN: 0cm 0cm 0pt
}
LI.ImprintUniqueID {
        MARGIN: 0cm 0cm 0pt
}
DIV.ImprintUniqueID {
        MARGIN: 0cm 0cm 0pt
}
TABLE.ImprintUniqueIDTable {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style>
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<p class="ImprintUniqueID"></p>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thanks
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D;mso-fareast-language:EN-US">J</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I’ve now found out I’m going to need to use sip_to_display instead.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">However I’ve found this weirdness occurring:<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><action application="rxfax" data="/var/spool/fax/FAX-${sip_to_display}-${caller_id_number}-${uuid}.tif"/><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><action application="system" data="php /var/www/newfax.php FAX-${sip_to_display}-${caller_id_number}-${uuid}.tif && echo 1"/><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><action application="hangup"/><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><br>
When Running the first line the fax gets stored using the correct number: <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">d1841980-a51a-11e5-891a-4f40b9cf9e3e EXECUTE sofia/external/61344443333@pbx1pbx.internal rxfax(/var/spool/fax/FAX-61799997777-61344443333-d1841980-a51a-11e5-891a-4f40b9cf9e3e.tif)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">But the second line:<br>
d1841980-a51a-11e5-891a-4f40b9cf9e3e EXECUTE sofia/external/61344443333@pbx1pbx.internal system(php /var/www/newfax.php FAX-61344443333-61344443333-d1841980-a51a-11e5-891a-4f40b9cf9e3e.tif && echo 1)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Is this the expected behaviour?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Kyle.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org]
<b>On Behalf Of </b>Jurijs Ivolga<br>
<b>Sent:</b> Wednesday, 16 December 2015 6:33 PM<br>
<b>To:</b> FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org><br>
<b>Subject:</b> Re: [Freeswitch-users] Dial plan variables<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Kyle,<br>
<br>
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:<br>
<br>
<a href="https://freeswitch.org/confluence/display/FREESWITCH/Channel+Variables" target="_blank">https://freeswitch.org/confluence/display/FREESWITCH/Channel+Variables</a><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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:<br>
<br>
2015-12-16 02:20:45.581035 [INFO] mod_dptools.c:1711 CHANNEL_DATA:<br>
Channel-State: [CS_EXECUTE]<br>
Channel-Call-State: [RINGING]<br>
Channel-State-Number: [4]<br>
Channel-Name: [.....]<br>
....<br>
....<br>
....<br>
Caller-Destination-Number: [Value which you are looking for]<br>
....<br>
....<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">With kind regards,<o:p></o:p></p>
</div>
<p class="MsoNormal">Jurijs<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">2015-12-16 8:59 GMT+02:00 Volodymyr Fedorov <<a href="mailto:lexxua@gmail.com" target="_blank">lexxua@gmail.com</a>>:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal">Even variable is not exist you can parse sip-headers and extract variables via regex:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">bellow example for parse to-header<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><action application="set" data="act_nmbr=${regex(${sip_h_To}|^\<<a href="sip:(\d*)\@.*\">sip:(\d*)\@.*\</a>>.*$|0%1)}"/><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Dec 16, 2015 at 1:48 AM, Kyle Hunter <<a href="mailto:khunter@thesummitgroup.com.au" target="_blank">khunter@thesummitgroup.com.au</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hey,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I’ve currently got a dial plan set up to receive faxes which looks like:<br>
<action application="rxfax" data="/var/spool/fax/FAX-${destination_number}-${caller_id_number}-${uuid}.tif"/><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Kyle<o:p></o:p></p>
</div>
<p> <o:p></o:p></p>
<p><b><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Kyle Hunter | Network Engineer | The Summit Group</span><o:p></o:p></b></p>
<p><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">E: </span><a href="mailto:khunter@thesummitgroup.com.au" target="_blank" title="Click to send email to Kyle Hunter"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">khunter@thesummitgroup.com.au</span></a><span style="font-size:10.0pt;font-family:"Calibri",sans-serif"> | W:
</span><o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">The Summit Group (Australia) Pty Ltd | P: | Level 1, 39 Railway Road, Blackburn VIC 3130<br>
The Summit Group (USA) LLC | P: </span><a href="tel:321%20216%203844" target="_blank"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">321 216 3844</span></a><span style="font-size:10.0pt;font-family:"Calibri",sans-serif"> | Suite 1003, 364E
Main Street, Middletown DE 19709<br>
Postal: P.O. Box 3225, Doncaster East VIC 3109</span><o:p></o:p></p>
<p> <o:p></o:p></p>
<p><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">Follow us on </span>
<a href="http://www.facebook.com/thesummitgroup/" target="_blank"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">Facebook</span></a><span style="font-size:10.0pt;font-family:"Calibri",sans-serif"> |
</span><a href="http://www.linkedin.com/company/1942329" target="_blank"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">LinkedIn</span></a><span style="font-size:10.0pt;font-family:"Calibri",sans-serif"> |
</span><a href="http://twitter.com/summitgroupau/" target="_blank"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">Twitter</span></a><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
</p>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
<p></p>
<p class="ImprintUniqueID"><font size="2" face="Calibri"></font> </p>
<strong>
<p class="ImprintUniqueID"><font style="font-family:Calibri;font-size:10pt;color:Black;font-weight:bold;">Kyle</font><font color="black" size="2" face="Calibri"> </font><font style="font-family:Calibri;font-size:10pt;color:Black;">Hunter</font><font color="black" size="2" face="Calibri"> |
</font><font style="font-family:Calibri;font-size:10pt;color:Black;font-weight:bold;">Network Engineer</font><font color="black" size="2" face="Calibri"> |
</font><font style="font-family:Calibri;font-size:10pt;color:Black;">The Summit Group</font></p>
</strong>
<p class="ImprintUniqueID"><font size="2" face="Calibri">E: </font><span style="font-family:Calibri;font-size:10pt;"><a href="mailto:khunter@thesummitgroup.com.au" title="Click to send email to Kyle Hunter" target="" style="font-family:Calibri;font-size:10pt;"><span style="font-family:Calibri; font-size:10pt;">khunter@thesummitgroup.com.au</span></a></span><font size="2" face="Calibri"> | W:
</font></p>
<p class="ImprintUniqueID"><font size="2" face="Calibri">The Summit Group (Australia) Pty Ltd | P: </font><font size="2"><font face="Calibri"> | Level 1, 39 Railway Road, Blackburn VIC 3130<br>
The Summit Group (USA) LLC | P: 321 216 3844 | Suite 1003, 364E Main Street, Middletown DE 19709<br>
</font><font face="Calibri">Postal: P.O. Box 3225, Doncaster East VIC 3109</font></font></p>
<p class="ImprintUniqueID"><font size="2" face="Calibri"></font> </p>
<p class="ImprintUniqueID"><font size="2" face="Calibri">Follow us on </font><a href="http://www.facebook.com/thesummitgroup/"><font size="2" face="Calibri">Facebook</font></a><font size="2" face="Calibri"> |
</font><a href="http://www.linkedin.com/company/1942329"><font size="2" face="Calibri">LinkedIn</font></a><font size="2" face="Calibri"> |
</font><a href="http://twitter.com/summitgroupau/"><font size="2" face="Calibri">Twitter</font></a><em><strong><br>
</strong></em></p>
<p class="ImprintUniqueID"></p>
<div class="WordSection1">
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<p class="MsoNormal">_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><span style="color:#888888"><br>
<br clear="all">
<span class="hoenzb"><o:p></o:p></span></span></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><span class="hoenzb"><span style="color:#888888">-- </span><o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:#888888">Best regards,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#888888">Volodymyr<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><o:p></o:p></p>
</blockquote>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p></p>
<p><font size="2" face="Calibri"></font></p>
<p><font size="2" face="Calibri"></font></p>
</body>
</html>