OK

 

I correct to this ->

 

   <extension name="12345">

    <condition field="destination_number" expression="^(10[01][0-9])$|^(12345)$">

       <action application="set" data="dialed_ext=$1"/>

     </condition>

     <condition field="destination_number" expression="^${caller_id_number}$">

       <action application="set" data="voicemail_authorized=${sip_authorized}"/>

       <action application="answer"/>

       <action application="sleep" data="1000"/>

       <action application="voicemail" data="check default $${domain} ${dialed_ext}"/>

       <anti-action application="ring_ready"/>

       <anti-action application="set" data="call_timeout=10"/>

       <anti-action application="set" data="hangup_after_bridge=true"/>

       <anti-action application="set" data="continue_on_fail=true"/>

       <anti-action application="bridge" data="USER/12345@$${domain}"/>

       <anti-action application="answer"/>

       <anti-action application="sleep" data="1000"/>

       <anti-action application="voicemail" data="default $${domain} ${dialed_ext}"/>

     </condition>

   </extension>

 

Now i receive call on extension but without calle_id.

 

Tks

 

De : freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] De la part de Erwan Hermouet
Envoyé : mercredi 27 mars 2013 08:49
À : 'FreeSWITCH Users Help'
Objet : Re: [Freeswitch-users] callee id inbound

 

Here the log file

 

2013-03-27 08:42:05.744114 [DEBUG] switch_core_state_machine.c:157 sofia/internal/06xxxxx@voip.vivaction.net Standard EXECUTE 
2013-03-27 08:42:05.744114 [DEBUG] mod_sofia.c:239 sofia/internal/06xxxxx@voip.vivaction.net SOFIA EXECUTE 
2013-03-27 08:42:05.744114 [DEBUG] switch_core_state_machine.c:348 (sofia/internal/06xxxx@voip.xxxxx) State EXECUTE 
2013-03-27 08:42:05.744114 [DEBUG] switch_core_state_machine.c:314 (sofia/internal/06xxxx@voip.xxxxx) Running State Change CS_EXECUTE 
2013-03-27 08:42:05.744114 [DEBUG] switch_core_state_machine.c:341 (sofia/internal/06xxxx@voip.xxxxx) State ROUTING going to sleep 
2013-03-27 08:42:05.744114 [DEBUG] switch_core_session.c:1047 Send signal sofia/internal/06xxxx@voip.xxxx[BREAK] 
2013-03-27 08:42:05.744114 [DEBUG] switch_core_state_machine.c:119 (sofia/internal/06xxxx@voip.ccccc) State Change CS_ROUTING -> CS_EXECUTE 
Dialplan: sofia/internal/06xxxx@voip.xxx Action transfer(12345 XML default) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action bridge(loopback/app=voicemail:default ${domain_name} ${dialed_extension}) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action sleep(1000) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action answer() 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action bridge({sip_invite_domain=87.x.x.x}user/${dialed_extension}@${domain_name}) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action hash(insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action set(called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)})
Dialplan: sofia/internal/06xxxx@voip.xxxx Action hash(insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action hash(insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action set(continue_on_fail=true) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action set(hangup_after_bridge=true) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action set(call_timeout=30) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action set(transfer_ringback=local_stream://moh) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action set(ringback=${us-ring}) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action bind_meta_app(4 b s execute_extension::att_xfer XML features) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action bind_meta_app(3 b s execute_extension::cf XML features) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action bind_meta_app(2 b s record_session::/opt/freeswitch/recordings/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action bind_meta_app(1 b s execute_extension::dx XML features) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action export(dialed_extension=) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Action set(dialed_extension=) 
Dialplan: sofia/internal/06xxxx@voip.xxxx Regex (PASS) [12345] destination_number(12345) =~ /^(10[01][0-9])$|^(12345)$/ break=on-false 
Dialplan: sofia/internal/06xxxx@voip.xxxx parsing [default->12345] continue=false

 

Tks advance for your trying to help me J

 

De : freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] De la part de Steven Schoch
Envoyé : mercredi 27 mars 2013 00:25
À : FreeSWITCH Users Help
Objet : Re: [Freeswitch-users] callee id inbound

 

That is not your extension.  What I mean is that you gave us a dialplan extension named 12345, but the name of the extension is only meaningful when you're looking at a log file.  Just because an extension is named 12345 does not mean its actions will get executed when 12345 is dialed.

 

The important part of an extension is the condition.  In this case the condition of that extension is:

      <condition field="destination_number" expression="^(10[01][0-9])$">

This means that condition will only be used if the number dialed (the number to which you transfer the call) is between 1000 and 1019.  Since you transferred to 12345, the condition does not match, so that extension will be skipped, and processing will continue to other extensions.

 

You have to find the extension that is actually getting processed. The easiest way is to look in the log file (or the CLI). You should see lines that start with "Dialplan:" and say PASS or FAIL. The last one that PASSed is probably the extension that ended up getting used. Once you find that, we can look at it to check the caller_id variables.

 

-- 

Steve

 

 

On Tue, Mar 26, 2013 at 1:47 PM, Erwan Hermouet <ehermouet@bluetel.fr> wrote:

Hi

 

Tks for your reply

 

Here my default

 

    <extension name="12345">

      <condition field="destination_number" expression="^(10[01][0-9])$">

       <action application="set" data="dialed_extension=$1"/>

       <action application="export" data="dialed_extension=$1"/>

       <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> -->

       <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/>

       <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>

       <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/>

       <action application="bind_meta_app" data="4 b s execute_extension::att_xfer XML features"/>

       <action application="set" data="ringback=${us-ring}"/>

       <action application="set" data="transfer_ringback=$${hold_music}"/>

       <action application="set" data="call_timeout=30"/>

       <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> -->

       <action application="set" data="hangup_after_bridge=true"/>

       <!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> -->

       <action application="set" data="continue_on_fail=true"/>

       <action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/>

       <action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/>

       <action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/>

       <!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>-->

       <action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/>

       <action application="bridge" data="{sip_invite_domain=$${domain}}user/${dialed_extension}@${domain_name}"/>

       <action application="answer"/>

       <action application="sleep" data="1000"/>

       <action application="bridge" data="loopback/app=voicemail:default ${domain_name} ${dialed_extension}"/>

      </condition>

    </extension>