Skip to main content

Provider DIDforSale (US, Canada, UK)

didforsale.com

Last update: 15 January 2010

/conf/directory/default

<include>
<user id="19498858961" mailbox="19498858961">
<params>
<param name="password" value="1234"/>
<param name="vm-password" value="19498858961"/>
</params>
<variables>
<variable name="accountcode" value="19498858961"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="Extension 19498858961"/>
<variable name="effective_caller_id_number" value="19498858961"/>
</variables>
</user>
</include>

/conf/dialplan/extensions

 <extension name="exten_19498858961">
<condition field="destination_number" expression="^(19498858961)$">
<action application="set" data="dialed_ext=$1"/>
<action application="export" data="dialed_ext=$1"/>
</condition>
<condition field="destination_number" expression="^${caller_id_number}$">
<!--<anti-action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> -->
<anti-action application="set" data="continue_on_fail=true"/>
<anti-action application="bridge" data="user/${dialed_ext}@$${domain}"/>
<anti-action application="answer"/>
</condition>
</extension>

Until here I was able to call this number from my local extensions 1001-1019 and vice versa. But Call did not come from PSTN number, I was getting SIP: 404 Error. Then I added these lines in /usr/local/freeswitch/conf/dialplan/public.xml and it worked:

<extension name="public_did_didforsale">
<condition field="destination_number" expression="^(19498858961)$">
<action application="transfer" data="$1 XML default"/>
</condition>
</extension>