This code was given by a customer. Thank you,

Freeswitch so rocks!  I used asterisk before and this is just cooler.

Anyway, yes the external profile defined in freeswitch will accept anonymous calls on 5080.  So that handle your termination to me.

I had to set up a conf/directory/<DID>.xml to handle the endpoint registration on my switch.  That’s pretty standard.

— filename conf/directory/default/17143612089.xml —
<include>
<user id=”7143612089″ mailbox=”7143612089″>
<params>
<param name=”username” value=”7143612089″/>
<param name=”password” value=”blah”/>
<param name=”vm-password” value=”12345″/>
<param name=”vm-email-all-messages” value=”true”/>
<param name=”vm-attach-file” value=”true”/>
<param name=”vm-mailto” value=“someuser@somedomain.com”/>
</params>
<variables>
<variable name=”accountcode” value=”7143612089″/>
<variable name=”user_context” value=”default”/>
<variable name=”effective_caller_id_name” value=”replace with Customers Name”/>
<variable name=”effective_caller_id_number” value=”7143612089″/>
</variables>
</user>
</include>

Then I set the conf/dialplan/extensions/<DID>.xml so that it will bridge the call properly and it’s done.

— filename conf/dialplan/extensions/7143612089.xml —

<extension name=”7143612089″>
<condition field=”destination_number” expression=”^[01]?(7143612089)$”>
<action application=”ring_ready”/>
<action application=”set” data=”ignore_early_media=true”/>
<action application=”set” data=”call_timeout=25″/>
<action application=”set” data=”hangup_after_bridge=true”/>
<action application=”set” data=”continue_on_fail=NORMAL_TEMPORARY_FAILURE,TIMEOUT,

NO_ROUTE_DESINATION,NO_ANSWER,DESTINATION_OUT_OF_ORDER”/>
<action application=”set” data=”ringback=/usr/local/freeswitch/sounds/holdmusic/06.mp3″/>
<action application=”bridge” data=”sofia/internal/$1″/>
<action application=”answer”/>
<action application=”voicemail” data=”default sip.sparkz.tv 1$1″/>
<action application=”hangup”/>
</condition>
</extension>

The call terminated properly, woot.

Hope this wil help users using Free Switch and wants to buy VoIP DID from DID for Sale.