[Freeswitch-users] manipulate CID

Sam u2nsam at gmail.com
Fri Jun 3 13:04:44 MSD 2011


Thanks it works

On Fri, Jun 3, 2011 at 1:44 PM, Boris Kovalenko <boris at tagnet.ru> wrote:

>  Hello!
>
>     There is no variable ${Caller-Caller-ID-Number}, but
> ${caller_id_number}. Please look at
> http://wiki.freeswitch.org/wiki/Channel_Variables
>
> I still cannot get desired caller id through prefixing,
>
> i get from header as :-  From: "" <sip:91 at xxx.xxx.xxx.xxx>
>
>
> <extension name="novanet_7001">
>             <condition field="destination_number" expression="^(7001)"
> continue="false">
>             <action application="set" data="call_timeout=20"/>
>             <action application="info" />
>             <action application="set"
> data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION,USER_NOT_REGISTERED"/>
>
>             <action application="set"
> data="effective_caller_id_number=91${Caller-Caller-ID-Number}"/>
>             <action application="ring_ready" />
>             <action application="bridge"
> data="{sip_cid_type=rpid}sofia/gateway/novanet/1646xxxxxxxx"/>
>
> </condition>
>         </extension>
>
> Logs:
> -----------------------
>
> Dialplan: FreeTDM/1:13/7001 Action
> set(continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION,USER_NOT_REGISTERED)
> Dialplan: FreeTDM/1:13/7001 Action
> set(effective_caller_id_number=91${Caller-Caller-ID-Number})
> Dialplan: FreeTDM/1:13/7001 Action ring_ready()
> Dialplan: FreeTDM/1:13/7001 Action
> bridge({sip_cid_type=rpid}sofia/gateway/novanet/1646xxxxxxx)
> 2011-06-03 03:52:34.765627 [DEBUG] switch_core_state_machine.c:119
> (FreeTDM/1:13/7001) State Change CS_ROUTING -> CS_EXECUTE
> 2011-06-03 03:52:34.765627 [DEBUG] switch_core_session.c:1116 Send signal
> FreeTDM/1:13/7001 [BREAK]
> 2011-06-03 03:52:34.765627 [DEBUG] switch_core_state_machine.c:359
> (FreeTDM/1:13/7001) State ROUTING going to sleep
> 2011-06-03 03:52:34.765627 [DEBUG] switch_core_state_machine.c:320
> (FreeTDM/1:13/7001) Running State Change CS_EXECUTE
> 2011-06-03 03:52:34.765627 [DEBUG] switch_core_state_machine.c:366
> (FreeTDM/1:13/7001) State EXECUTE
> 2011-06-03 03:52:34.765627 [DEBUG] mod_freetdm.c:451 FreeTDM/1:13/7001
> CHANNEL EXECUTE
> 2011-06-03 03:52:34.765627 [DEBUG] switch_core_state_machine.c:157
> FreeTDM/1:13/7001 Standard EXECUTE
> EXECUTE FreeTDM/1:13/7001 set(call_timeout=20)
> 2011-06-03 03:52:34.765627 [DEBUG] mod_dptools.c:1059 FreeTDM/1:13/7001 SET
> [call_timeout]=[20]
> EXECUTE FreeTDM/1:13/7001 info()
> 2011-06-03 03:52:34.765627 [INFO] mod_dptools.c:1202 CHANNEL_DATA:
> Channel-State: [CS_EXECUTE]
> Channel-Call-State: [RINGING]
> Channel-State-Number: [4]
> Channel-Name: [FreeTDM/1:13/7001]
> Unique-ID: [8949f10a-ad91-4705-95a7-eb42dfcfe40f]
> Call-Direction: [inbound]
> Presence-Call-Direction: [inbound]
> Channel-Call-UUID: [8949f10a-ad91-4705-95a7-eb42dfcfe40f]
> Answer-State: [ringing]
> Channel-Read-Codec-Name: [PCMA]
> Channel-Read-Codec-Rate: [8000]
> Channel-Read-Codec-Bit-Rate: [64000]
> Channel-Write-Codec-Name: [PCMA]
> Channel-Write-Codec-Rate: [8000]
> Channel-Write-Codec-Bit-Rate: [64000]
> Caller-Direction: [inbound]
> Caller-Username: [FreeTDM]
> Caller-Dialplan: [XML]
> Caller-Caller-ID-Number: [8097328707]
> Caller-ANI: [8097328707]
> Caller-Destination-Number: [7001]
> Caller-Unique-ID: [8949f10a-ad91-4705-95a7-eb42dfcfe40f]
> Caller-Source: [mod_freetdm]
> Caller-Context: [novanet]
> Caller-RDNIS: [7001]
> Caller-Channel-Name: [FreeTDM/1:13/7001]
> Caller-Profile-Index: [2]
> Caller-Profile-Created-Time: [1307073154764686]
> Caller-Channel-Created-Time: [1307073154758018]
> Caller-Channel-Answered-Time: [0]
> Caller-Channel-Progress-Time: [0]
> Caller-Channel-Progress-Media-Time: [0]
> Caller-Channel-Hangup-Time: [0]
> Caller-Channel-Transfer-Time: [0]
> Caller-Screen-Bit: [true]
> Caller-Privacy-Hide-Name: [false]
> Caller-Privacy-Hide-Number: [false]
> variable_direction: [inbound]
> variable_uuid: [8949f10a-ad91-4705-95a7-eb42dfcfe40f]
> variable_read_codec: [PCMA]
> variable_read_rate: [8000]
> variable_write_codec: [PCMA]
> variable_write_rate: [8000]
> variable_channel_name: [FreeTDM/1:13/7001]
> variable_freetdm_span_name: [wp1]
> variable_freetdm_span_number: [1]
> variable_freetdm_chan_number: [13]
> variable_freetdm_bearer_capability: [0]
> variable_freetdm_bearer_layer1: [3]
> variable_freetdm_screening_ind: [network-provided]
> variable_freetdm_presentation_ind: [presentation-allowed]
> variable_dialed_extension: [7001]
> variable_transfer_ringback: [local_stream://moh]
> variable_#: [true]
> variable_export_vars: [#,*,#]
> variable_bind_meta_key: [#]
> variable_hangup_after_bridge: [true]
> variable_continue_on_fail: [true]
> variable_called_party_callgroup: [1]
> variable_dialed_user: [7001]
> variable_dialed_domain: [192.168.2.190]
> variable_call_uuid: [8949f10a-ad91-4705-95a7-eb42dfcfe40f]
> variable_originate_disposition: [USER_NOT_REGISTERED]
> variable_max_forwards: [70]
> variable_call_timeout: [20]
> variable_current_application: [info]
>
>
> EXECUTE FreeTDM/1:13/7001
> set(continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION,USER_NOT_REGISTERED)
> 2011-06-03 03:52:34.766572 [DEBUG] mod_dptools.c:1059 FreeTDM/1:13/7001 SET
> [continue_on_fail]=[NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION,USER_NOT_REGISTERED]
> EXECUTE FreeTDM/1:13/7001 set(effective_caller_id_number=91)
> 2011-06-03 03:52:34.766572 [DEBUG] mod_dptools.c:1059 FreeTDM/1:13/7001 SET
> [effective_caller_id_number]=[91]
> EXECUTE FreeTDM/1:13/7001 ring_ready()
> 2011-06-03 03:52:34.766572 [DEBUG] mod_freetdm.c:861 [s1c13][1:13]
> Indicating RINGING in state PROCEED
> 2011-06-03 03:52:34.766572 [DEBUG] mod_freetdm.c:861 [s1c13][1:13] Changed
> state from PROCEED to RINGING
> 2011-06-03 03:52:34.766572 [DEBUG] ftdm_state.c:508 [s1c13][1:13] Executing
> state processor for RINGING
> 2011-06-03 03:52:34.766572 [DEBUG] ftmod_sangoma_isdn.c:614 [s1c13][1:13]
> Completed state change from PROCEED to RINGING in 0ms
> 2011-06-03 03:52:34.766572 [DEBUG] ftmod_sangoma_isdn.c:625 [s1c13][1:13]
> processing state change to RINGING
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----------------------------------------------------------
>
>
>
> On Thu, Jun 2, 2011 at 12:18 PM, Sam <u2nsam at gmail.com> wrote:
>
>> Hello,
>>
>>
>> How do i manipulate callerid number ... i have the below statement
>>
>> <action application="set"
>> data="effective_caller_id_number=66${outbound_caller_id_number}"/>
>>
>> here i want to prefix caller id with 66 so the effective caller id becomes
>> 66 + original callerid .
>>
>> using above statement the caller id passed was just 66 to the far end.
>>
>> below is the dialplan i used.
>>
>> <extension name="7001">
>>             <condition field="destination_number" expression="^(7001)"
>> continue="false">
>>             <action application="set" data="call_timeout=20"/>
>>             <action application="info" />
>>             <action application="set"
>> data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION,USER_NOT_REGISTERED"/>
>>
>>             <action application="set"
>> data="effective_caller_id_number=66${outbound_caller_id_number}"/>
>>             <action application="ring_ready" />
>>             <action application="bridge"
>> data="{sip_cid_type=rpid}sofia/gateway/outbound/1646xxxxxxx"/>
>>
>>         </extension>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> This is from header i get .
>>
>> From: "" <sip:66 at 203.153.53.138>
>>
>>
>> -------------------------------------------------------------------------------------------------------------------
>>
>>
>>
>> Dialplan: FreeTDM/1:29/7001 Action info()
>> Dialplan: FreeTDM/1:29/7001 Action
>> set(continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION,USER_NOT_REGISTERED)
>> Dialplan: FreeTDM/1:29/7001 Action
>> set(effective_caller_id_number=66${outbound_caller_id_number})
>> Dialplan: FreeTDM/1:29/7001 Action ring_ready()
>> Dialplan: FreeTDM/1:29/7001 Action
>> bridge({sip_cid_type=rpid}sofia/gateway/outbound/1646xxxxxxx)
>> 2011-06-02 06:43:48.111347 [DEBUG] switch_core_state_machine.c:119
>> (FreeTDM/1:29/7001) State Change CS_ROUTING -> CS_EXECUTE
>> 2011-06-02 06:43:48.111347 [DEBUG] switch_core_session.c:1116 Send signal
>> FreeTDM/1:29/7001 [BREAK]
>> 2011-06-02 06:43:48.111347 [DEBUG] switch_core_state_machine.c:359
>> (FreeTDM/1:29/7001) State ROUTING going to sleep
>> 2011-06-02 06:43:48.111347 [DEBUG] switch_core_state_machine.c:320
>> (FreeTDM/1:29/7001) Running State Change CS_EXECUTE
>> 2011-06-02 06:43:48.111347 [DEBUG] switch_core_state_machine.c:366
>> (FreeTDM/1:29/7001) State EXECUTE
>> 2011-06-02 06:43:48.111347 [DEBUG] mod_freetdm.c:451 FreeTDM/1:29/7001
>> CHANNEL EXECUTE
>> 2011-06-02 06:43:48.111347 [DEBUG] switch_core_state_machine.c:157
>> FreeTDM/1:29/7001 Standard EXECUTE
>> EXECUTE FreeTDM/1:29/7001 set(call_timeout=20)
>> 2011-06-02 06:43:48.111347 [DEBUG] mod_dptools.c:1059 FreeTDM/1:29/7001
>> SET [call_timeout]=[20]
>> EXECUTE FreeTDM/1:29/7001 info()
>> 2011-06-02 06:43:48.111347 [INFO] mod_dptools.c:1202 CHANNEL_DATA:
>> Channel-State: [CS_EXECUTE]
>> Channel-Call-State: [RINGING]
>> Channel-State-Number: [4]
>> Channel-Name: [FreeTDM/1:29/7001]
>> Unique-ID: [e5b47553-3b9c-4692-beaa-513a3a3356c2]
>> Call-Direction: [inbound]
>> Presence-Call-Direction: [inbound]
>> Channel-Call-UUID: [e5b47553-3b9c-4692-beaa-513a3a3356c2]
>> Answer-State: [ringing]
>> Channel-Read-Codec-Name: [PCMA]
>> Channel-Read-Codec-Rate: [8000]
>> Channel-Read-Codec-Bit-Rate: [64000]
>> Channel-Write-Codec-Name: [PCMA]
>> Channel-Write-Codec-Rate: [8000]
>> Channel-Write-Codec-Bit-Rate: [64000]
>> Caller-Direction: [inbound]
>> Caller-Username: [FreeTDM]
>> Caller-Dialplan: [XML]
>> Caller-Caller-ID-Number: [8097328707]
>> Caller-ANI: [8097328707]
>> Caller-Destination-Number: [7001]
>> Caller-Unique-ID: [e5b47553-3b9c-4692-beaa-513a3a3356c2]
>> Caller-Source: [mod_freetdm]
>> Caller-RDNIS: [7001]
>> Caller-Channel-Name: [FreeTDM/1:29/7001]
>> Caller-Profile-Index: [2]
>> Caller-Profile-Created-Time: [1306997028110372]
>> Caller-Channel-Created-Time: [1306997028103773]
>> Caller-Channel-Answered-Time: [0]
>> Caller-Channel-Progress-Time: [0]
>> Caller-Channel-Progress-Media-Time: [0]
>> Caller-Channel-Hangup-Time: [0]
>> Caller-Channel-Transfer-Time: [0]
>> Caller-Screen-Bit: [true]
>> Caller-Privacy-Hide-Name: [false]
>> Caller-Privacy-Hide-Number: [false]
>> variable_direction: [inbound]
>> variable_uuid: [e5b47553-3b9c-4692-beaa-513a3a3356c2]
>> variable_read_codec: [PCMA]
>> variable_read_rate: [8000]
>> variable_write_codec: [PCMA]
>> variable_write_rate: [8000]
>> variable_channel_name: [FreeTDM/1:29/7001]
>> variable_freetdm_span_name: [wp1]
>> variable_freetdm_span_number: [1]
>> variable_freetdm_chan_number: [29]
>> variable_freetdm_bearer_capability: [0]
>> variable_freetdm_bearer_layer1: [3]
>> variable_freetdm_screening_ind: [network-provided]
>> variable_freetdm_presentation_ind: [presentation-allowed]
>> variable_dialed_extension: [7001]
>> variable_transfer_ringback: [local_stream://moh]
>> variable_#: [true]
>> variable_export_vars: [#,*,#]
>> variable_bind_meta_key: [#]
>> variable_hangup_after_bridge: [true]
>> variable_continue_on_fail: [true]
>> variable_called_party_callgroup: [1]
>> variable_dialed_user: [7001]
>> variable_dialed_domain: [192.168.2.190]
>> variable_call_uuid: [e5b47553-3b9c-4692-beaa-513a3a3356c2]
>> variable_originate_disposition: [USER_NOT_REGISTERED]
>> variable_max_forwards: [70]
>> variable_call_timeout: [20]
>> variable_current_application: [info]
>>
>>
>>
>> Regards
>> Sam
>>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
>
>
>
> --
> Regards,
> Boris
>
>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110603/301c3e7f/attachment-0001.html 


More information about the FreeSWITCH-users mailing list