[Freeswitch-users] Caller id number in dialplan

Ivan C Myrvold ivan at myrvold.org
Sun Aug 17 02:00:06 PDT 2008


Yes you are right. I tried without it, and the dialplan went correctly  
into the second condition.
But I still get the wroung bridge ($1):

2008-08-17 10:52:04 [NOTICE] switch_channel.c:534  
switch_channel_set_name() New Channel sofia/external/$1  
[43ab7180-5c72-4265-a084-c50cc69bf535]

Ivan

On 17. aug.. 2008, at 10:45, Brian West wrote:

> 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
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>





More information about the FreeSWITCH-users mailing list