Page 1 of 1

how to capture mobile number of incoming calls in Extension

PostPosted: Wed Jul 25, 2018 5:29 am
by nani
I have created did the incoming calls are coming fine, how to get the incoming number in extension

what is the key value i have to use to get mobile number in extension ${CALLERID(num)},the value getting null

which keyword will give exact incoming mobile number.

Re: how to capture mobile number of incoming calls in Extens

PostPosted: Wed Jul 25, 2018 6:56 am
by mflorell
What version of Asterisk are you using?

What exactly are you looking to do with the Caller ID Number?

Re: how to capture mobile number of incoming calls in Extens

PostPosted: Wed Jul 25, 2018 5:57 pm
by williamconley
nani wrote:I have created did the incoming calls are coming fine, how to get the incoming number in extension

what is the key value i have to use to get mobile number in extension ${CALLERID(num)},the value getting null

which keyword will give exact incoming mobile number.


Where you use ${CALLERID(num)} is very important. Provide a CLI example of your usage (and/or your diaplan entry or extensions.conf entry for trunkinbound ...?)

Re: how to capture mobile number of incoming calls in Extens

PostPosted: Wed Jul 25, 2018 11:14 pm
by nani
Asterisk 1.8.32(astreisk version)
this is my inbound extension.
[trunkinbound]

exten => _X.,n,Set(mobno=${CALLERID(num)})
exten => _X.,n,AGI(agi-DID_route.agi)
;;exten => _X.,n,AGI(agi-DID_route.agi)
exten => _X.,n,Hangup()
; If you have DIDs that arrive with a plus sign at the beginning then uncomment
;exten => _+X.,1,AGI(agi-DID_route.agi)
;exten => _+X.,n,Hangup()
; If you have DIDs that arrive with a plus and 1 at the beginning that you want to filter out, then uncomment
;exten => _+1X.,1,Goto(trunkinbound,${EXTEN:2},1)

; FastAGI for VICIDIAL/astGUIclient call logging
exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses ... EBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})

In this i am trying to capture the incoming mobile number in which keywod i will get the incoming number

Re: how to capture mobile number of incoming calls in Extens

PostPosted: Wed Jul 25, 2018 11:27 pm
by williamconley
CLI output would be useful. That would show us that the value is in fact blank instead of later improper use of the variable you are attempting to define. That variable could be very easily lost during the vicidial process.

However: If your goal is to "do something" with this information, you're much better off reverting to the stock extensions.conf file and using "start_call URL" in the detail view of the campaign/ingroup settings

There is also the Filter URL of the DID settings that can be quite useful.

Filter URL -If the Filter Inbound Number field is set to URL then this is the web address of a script that will search a remote system and return a 1 for a match and a 0 for no match. Only two variables are available in the address if you use the VAR prefix like with webform addresses in campaigns, --A--phone_number--B-- and --A--did_pattern--B-- can be used in the URL to indicate the caller ID of the caller and the DID that the customer called in on.

Note that while this URL is designed to alter the pathway of the call within Vicidial, it still sends the phone number to a web URL ... and that web page (PHP usually) can do anything with that information you'd like. Without altering any Vicidial configuration files or code. Upgrade-proof. 8-)

Re: how to capture mobile number of incoming calls in Extens

PostPosted: Wed Jul 25, 2018 11:38 pm
by nani
yes after you said i called ${CALLERID(num)} that value as above now i am getting value thanku william and Mflorell,

Re: how to capture mobile number of incoming calls in Extens

PostPosted: Wed Aug 01, 2018 5:28 am
by nani
Hi Team i am having one more issue ,i have created did ,call menu and ingroup when user calls to inbound number ,i am routing to callmenu playing prompt as user press 1 routing to ingroup sales,press2 for generalenquiry.when user press one i am routing it to ingroup(agent).in agent screen phone number is not appearing.I checked recarding files there also phone number is not coming,please suggest me.how to get phone number in agent screen and recarding file.