My topology is like this:
SIP trunk provider ---------- my FreeSwitch -------------- Elastix ------------ X-Lite
Today, I make it work on the public IP asterisk registered to public IP FreeSwitch.
original issue might be I put the wrong register string in Elastix. ( should be username:passwd@realm and yesterday was username:passwd@realm/username )
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
Executing [s@from-pstn:1] Set("SIP/ABCDE-0000007f", "__FROM_DID=s") in new stack
So I guess, I need put application "set“ in my dialplan of my freeswitch, right ?
my current public dialplan of my number from SIP trunk provider like this.
<extension name="abctel-inbound-1234">
<condition field="destination_number"
<action application="set"
data="domain_name=$${domain}"/>
<action application="bridge" data="user/$1"/>
</condition>
</extension>
and in my directory/default, I have a file
6472221234.xml
<include>
<params>
<param name="password" value="$${default_password}"/>
<param name="vm-password" value="1234"/>
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="ABCDE"/>
<variable name="effective_caller_id_number" value="
6472221234"/>
<variable name="outbound_caller_id_name" value="ABCDE"/>
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
<variable name="callgroup" value="techsupport"/>
</variables>
</user>
</include>
What I expect is in Asterisk side, should be my DID from FreeSwitch to Asterisk as
What's my missing in Dialplan ? or director /default /
6472221234.xml ?
in the freeswitch wiki, it said exten to exten need put context = from-internal, and I did this by from-pstn.
my Asterisk trunk like this:
host=1.1.1.1
secret=xxxxxxxxxxxxxxx
type=friend
port=5060
qualify=no
insecure=very
dtmfmode=rfc2833
jbenable=no
disallow=all
context=from-pstn
allow=ulaw
trustpid=yes
sendrpid=yes
register string is :
any idea please let me know.
--------------------------------------------
My another problem here is the NAT I guess,
if my asterisk in my LAN (FreeSwitch still on the public IP. )
the same register shows in my asterisk cli
abc*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
can not register on the FreeSwitch.
Thank you again.
Sincerely,
Shaw