[Freeswitch-users] Caller id number in dialplan

Brian West brian at freeswitch.org
Sun Aug 17 01:45:46 PDT 2008


Your first condition you have shouldn't need a break= tag.  If you  
look at the Local_Extension example in the default config it does  
exactly this.

<extension name="Outbound_ip24">
   <condition field="destination_number" expression="^(.+)$">
     <action application="set" data="dialed_ext=$1"/>
   </condition>
   <condition field="caller_id_number" expression="^100$"  break="on- 
true">
     <action application="set" data="effective_caller_id_name=Ivan C  
Myrvold"/>
	<action application="set" data="effective_caller_id_number=37048300"/>
	<action application="bridge" data="sofia/gateway/ip24_37048300/$ 
{dialed_ext}"/>
   </condition>
   <condition field="caller_id_number" expression="^140$"  break="on- 
true">
	<action application="set" data="effective_caller_id_name=Laura L  
Myrvold"/>
	<action application="set" data="effective_caller_id_number=37397855"/>
	<action application="bridge" data="sofia/gateway/ip24_37397855/$ 
{dialed_ext}"/>
   </condition>
</extension>

/b


On Aug 17, 2008, at 3:36 AM, Ivan C Myrvold wrote:

> Now there is just 1 remaining issue I have with this, how to capture  
> the dialed number in the first condition, as I have done with the  
> parantheses in the destination_number expression, and use that in  
> the bridge in the other two conditions. Is that possible?
>
> I tried with the below xml, but that didn't work. I got $1 out as  
> the bridge number, and that obviously failed.
>
>   <extension name="Outbound_ip24">
>     <condition field="destination_number" expression="^(.+)$"   
> break="on-false"/>
> 	<condition field="caller_id_number" expression="^100$"  break="on- 
> true">
> 		<action application="set" data="effective_caller_id_name=Ivan C  
> Myrvold"/>
> 		<action application="set"  
> data="effective_caller_id_number=37048300"/>
> 		<action application="bridge" data="sofia/gateway/ip24_37048300/$1"/>
> 	</condition>
> 	<condition field="caller_id_number" expression="^140$"  break="on- 
> true">
> 		<action application="set" data="effective_caller_id_name=Laura L  
> Myrvold"/>
> 		<action application="set"  
> data="effective_caller_id_number=37397855"/>
> 		<action application="bridge" data="sofia/gateway/ip24_37397855/$1"/>
> 	</condition>
>   </extension>
>
> Ivan
>
>
> O




More information about the FreeSWITCH-users mailing list