<div dir="ltr">Thank you <b style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">Varghese Paul</b><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"> for looking my post.</span><div>
<span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><br></span></div><div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">My topology is like this:</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">SIP trunk provider ---------- my FreeSwitch -------------- Elastix ------------ X-Lite </div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Today, I make it work on the public IP asterisk registered to public IP FreeSwitch.<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">original issue might be I put the wrong register string in Elastix. ( should be username:passwd@realm and yesterday was username:passwd@realm/username )</div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Means I can accept the phone from SIP trunk provider to FreeSwitch, and forward to Elastix, however, in Elastix, can not get my real DID ( in my Asterisk log, showes </div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Executing [s@from-pstn:1] Set("SIP/ABCDE-0000007f", "__FROM_DID=s") in new stack</div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">So I guess, I need put application "set“ in my dialplan of my freeswitch, right ?</div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">my current public dialplan of my number from SIP trunk provider like this.</div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><div><br></div><div><extension name="abctel-inbound-1234"></div><div> <condition field="destination_number"</div><div>
expression="^<a href="tel:%286472221234" value="+16472221234" target="_blank">(6472221234</a>)$"></div><div> <action application="set"</div><div> data="domain_name=$${domain}"/></div>
<div> <action application="bridge" data="user/$1"/></div><div> </condition></div><div> </extension></div></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">and in my directory/default, I have a file <a href="tel:6472221234" value="+16472221234" target="_blank">6472221234</a>.xml</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><div><include></div><div> <user id="<a href="tel:6472221234" value="+16472221234" target="_blank">6472221234</a>"></div>
<div> <params></div><div> <param name="password" value="$${default_password}"/></div><div> <param name="vm-password" value="1234"/></div><div> </params></div>
<div> <variables></div><div> <variable name="toll_allow" value="domestic,international,local"/></div><div> <variable name="accountcode" value="<a href="tel:6472221234" value="+16472221234" target="_blank">6472221234</a>"/></div>
<div> <variable name="user_context" value="default"/></div><div> <variable name="effective_caller_id_name" value="ABCDE"/></div><div> <variable name="effective_caller_id_number" value="<a href="tel:6472221234" value="+16472221234" target="_blank">6472221234</a>"/></div>
<div> <variable name="outbound_caller_id_name" value="ABCDE"/></div><div> <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/></div><div>
<variable name="callgroup" value="techsupport"/></div><div> </variables></div><div> </user></div><div></include></div></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">What I expect is in Asterisk side, should be my DID from FreeSwitch to Asterisk as </div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
"__FROM_DID=<a href="tel:6472221234" value="+16472221234" target="_blank">6472221234</a>"<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
What's my missing in Dialplan ? or director /default / <a href="tel:6472221234" value="+16472221234" target="_blank">6472221234</a>.xml ?</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br>
</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">in the freeswitch wiki, it said exten to exten need put context = from-internal, and I did this by from-pstn. </div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">my Asterisk trunk like this:</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<div>host=1.1.1.1</div><div>username=<a href="tel:6472221234" value="+16472221234" target="_blank">6472221234</a></div><div>secret=xxxxxxxxxxxxxxx</div><div>type=friend</div><div>port=5060</div><div>qualify=no</div><div>
insecure=very</div>
<div>dtmfmode=rfc2833</div><div>deny=<a href="http://0.0.0.0/0.0.0.0" target="_blank">0.0.0.0/0.0.0.0</a></div><div>permit=<a href="http://1.1.1.1/255.255.255.255" target="_blank">1.1.1.1/255.255.255.255</a></div><div>jbenable=no</div>
<div>disallow=all</div><div>context=from-pstn</div><div>allow=ulaw</div><div>trustpid=yes</div><div>sendrpid=yes</div></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
register string is :</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><a href="mailto:6472221234%3Axxxxxxxxxxxx@1.1.1.1" target="_blank">6472221234:xxxxxxxxxxxx@1.1.1.1</a><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">any idea please let me know.</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">--------------------------------------------</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">My another problem here is the NAT I guess, </div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
if my asterisk in my LAN (FreeSwitch still on the public IP. ) </div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
the same register shows in my asterisk cli </div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><div>abc*CLI> sip show registry</div><div>Host dnsmgr Username Refresh State Reg.Time</div>
<div><a href="http://1.1.1.1:5060/" target="_blank">1.1.1.1:5060</a> N 1009 120 Request Sent</div></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">can not register on the FreeSwitch.</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Thank you again.</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
Sincerely,</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Shaw</div></div></div>