[Freeswitch-users] manipulate CID

Sam u2nsam at gmail.com
Thu Jun 2 20:16:45 MSD 2011


Is it possible to add prefix to caller id on FS ?

Regds
Sam



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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110602/0ec7c4dd/attachment-0001.html 


More information about the FreeSWITCH-users mailing list