Hi again,
yes of course that is right.
The dialingplan that I give it to you is only for worldwide calls.
You need a second dialing plan section in the XML
Look here all sections can be put in the dialing plan xml.
Internalcall means (see destination number is 3) that means all 3 long number can be dialed.
You can change it to 4 or 5
<extension name="internalcall">
<condition field="destination_number" expression="^(\d{3})$">
<action application="bridge" data="USER/$1@$${domain}" />
</condition>
</extension>
Here a small sample for echo. Use GSM codec or G711a law codec to call.
So you can hear you self.
<extension name="echo">
<condition field="destination_number" expression="^11$">
<action application="answer" />
<action application="echo" />
</condition>
</extension>
These sample gives you a beeeep tone.
<extension name="milliwatt">
<condition field="destination_number" expression="^12$">
<action application="answer" />
<action application="playback" data="tone_stream://%(10000,0,1004);loops=-1" />
</condition>
</extension>
From: Samira Mh [mailto:saami_mh@ymail.com]
Sent: Monday, May 14, 2012 4:01 PM
To: Erkan Ünlü (simalube)
Cc: Free SWITCH Users Help
Subject: Re: AW: [Freeswitch-users] configuring gateway for making calls
thanks so much for great help
but while dialing my umber using extensino:1000 that register on myfreeswitch server the error
is as follow:
2012-05-13 20:23:55.106289 [INFO] mod_dialplan_xml.c:418 Processing 1000->00989191949637 in context default
2012-05-13 20:23:55.248259 [INFO] switch_core_state_machine.c:142 No Route, Aborting
---------------------------------------------------------
cat /usr/local/freeswitch/conf/dialplan/default/01_shatel.xml
<extension name="Dial Out Custom Gateway">
<condition
field="destination_number" expression="^00(98/d{10})$">
<action application="bridge" data="sofia/gateway/shatel/$1"/>
2:cat /usr/local/freeswitch/conf/directory/default/1000.xml
--------------------------------------------------
<param name="password"
value="$${default_password}"/>
<param name="vm-password" value="1000"/>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="accountcode" value="1000"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="Extension 1000"/>
<variable name="effective_caller_id_number" value="1000"/>
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
<variable name="callgroup" value="techsupport"/>
1. Xml file is located at the directory/default
Here put this xml sample and try after reloadxml to register your softphone
<param name="password" value="yourpass" />
<param name="vm-password" value="1000" />
<variable name="toll_allow" value="domestic,international,local" />
<variable name="accountcode" value="1000" />
<variable name="user_context" value="myWorldWideDialingPlan" />
<variable name="effective_caller_id_name" value="0000" />
<variable name="effective_caller_id_number" value="0000" />
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}" />
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}" />
<variable
name="callgroup" value="techsupport" />
2. Build your dialingplan
The
dialingplan is located in the dialingplan folder. Create here a new xml and put this sample inside the file.
In the future you can study the default.xml in dialingplan folder to learn more about the dialingplan.
In this section you see that the user_context in the directory folder XML file is the same with context_name
So the user account is in association with the dialingplan. If you need you can build more different dialingplans for other requirements.
<context name=" myWorldWideDialingPlan">
<extension name="Worldwide">
<condition field="destination_number" expression="^00 (\d+)$">
<action application="set" data="hangup_after_bridge=true" />
<action application="bridge" data="sofia/gateway/gateway/00$1|sofia/gateway/gateway2/00$1" />
3. The last step is the gateway
Your gateway looks good and is reged correctly
You see the gateway name you written “custom”
You can change it to gateway1 or myfavoriteGW or what you want.
But the name of the gatewayname must be the same like this line in section 2 of my description
<action application="bridge" data="sofia/gateway/gateway/00$1|sofia/gateway/gateway2/00$1" />
Change the red gateway to the right gatewayname in your sip profiles external folder located XML
"sofia/gateway/gateway/00$1|sofia/gateway/gateway2/00$1”
I have 2 gateways
for failover if one gateway is down or gives errors.
| ß these character is an OR and mean if the first gateway gives an error so try the second gateway
You can use also only 1 gateway so delete the second gateway until to “ character
Hope that is now clear for you.
thanks so much for your reply;
i must configure file 01_custom.xml like :
<extension name="Dial Out Custom Gateway">
<condition field="destination_number"
expression="^9(1\d{10})$">
<action application="bridge"
data="sofia/gateway/custom/$1"/>
and because i registered via extension:1000 on freeswitch so :
must configure file 1000.xml like :
<param name="password" value="yourpass" />
<param name="vm-password" value="1000" />
<variable name="toll_allow" value="domestic,international,local" />
<variable name="accountcode" value="1000" />
<variable name="user_context" value="linktoyourdialplan" />
<variable name="effective_caller_id_name" value="0000" />
<variable
name="effective_caller_id_number" value="0000" />
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}" />
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}" />
<variable name="callgroup" value="techsupport" />
but i on't know what to be set as <variable name="user_context" value="linktoyourdialplan" /> in the 1000.xml?
please help, i am new in freeswitch
please build first of all them in the directory/default folder a XML file like this.
<param name="password" value="yourpass" />
<param name="vm-password" value="1000" />
<variable name="toll_allow" value="domestic,international,local" />
<variable name="accountcode" value="1000" />
<variable name="user_context" value="linktoyourdialplan" />
<variable name="effective_caller_id_name" value="0000" />
<variable name="effective_caller_id_number" value="0000" />
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}" />
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}" />
<variable name="callgroup" value="techsupport" />
Now you can register with your softphone to FS. See the user_context area in this section you must link it to your dialing plan
The dialing plan is located in dialing plan folder.
My simple dialing plan looks like this.
<context name="theNameOfDialingplan">
<extension name="Worldwide">
<condition field="destination_number" expression="^00 (\d+)$">
<action application="set" data="hangup_after_bridge=true" />
<action application="bridge" data="sofia/gateway/gateway/00$1|sofia/gateway/gateway2/00$1" />
The context name of the dialing plan must be the same in the directory XML user_context
I hope that this info are usefully for you.
i have configured gateway for making calls
but it dosn't work;
my config files are as follow:
first create file that name " iptel.org.xml " in the below path:
/usr/local/freeswitch/conf/sip_profiles/external/
i have an account on iptel.org like
:(username:aimas;password:mypass) <param name="username" value="arimas"/>
<param name="password" value="mypass"/>
<param name="realm" value="iptel.org"/>
<!-- iptel.org requires a 'proxy' parameter -->
sofia profile external restart reloadxml reloxm
=================================================================================================
10.0.3.15 alias internal ALIASED
=================================================================================================
then create file name
"01_custom.xml " in the below path :
/usr/local/freeswitch/conf/dialplan/default
the content of the files 01_custom.xml are:
<extension name="Dial Out Custom Gateway">
<condition field="destination_number"
expression="^9(1\d{10})$">
<action application="bridge"
data="sofia/gateway/custom/$1"/>
now when i dial 9, 1-800-555-1212 on eyebeam that register on freeswitch server the call is failed