Diaplan question, Hanging up call and setting specific statu

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Diaplan question, Hanging up call and setting specific statu

Postby callix » Sun Mar 02, 2025 5:58 pm

Mates,

I have a dialplan that runs BLA API, and when thats a FDNC number, it hangs up, if good then it continues with the call. Below dialplan is working great..!!

exten => _9898X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9898X.,n,AGI(agi-set_variables.agi,)
exten => _9898X.,n,Set(APIKEY=bla_apikey)
exten => _9898X.,n,Set(API_RESPONSE=${{SHELL(curl -s https://api.blacklistalliance.net/lookup?key=${{APIKEY}}&resp=json&phone=${{phone_number}})}})
exten => _9898X.,n,Set(BLACKLIST_STATUS=${{SHELL(echo ${{API_RESPONSE}} | jq -r .message)}})
exten => _9898X.,n,GotoIf($[${{BLACKLIST_STATUS}} = Good]?continue_call:blacklisted)
exten => _9898X.,n(blacklisted),Hangup()
exten => _9898X.,n(continue_call),Dial(SIP/${{EXTEN:4}}@carrier,55,o)
exten => _9898X.,n,Hangup()

I want to set it up in such a way that, when it hangsup, it should update the lead with status code "LITIGA", and vicidial_log says the same status code.

There is a dirty method ro a mysql query to update the vicidial_dial_log with some custom text to identify those calls. In my case, thats a mega cluster, so something simple willl be nice..!!
https://callix.ai
callix
 
Posts: 3
Joined: Wed Feb 05, 2025 5:55 pm
Location: Wyoming, USA

Re: Diaplan question, Hanging up call and setting specific s

Postby carpenox » Mon Mar 03, 2025 7:56 am

there is a way to set status via an agi - https://dialer.one/index.php/how-to-use-vicidials-agis/
Alma Linux 9.5 | SVN Version: 3919 | DB Schema Version: 1725 | Asterisk 18.26.0 | PHP8
https://dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
DC: https://discord.gg/DVktk6smbh -:- TG: https://t.me/+wkDmkF9U4aUxOGYx
carpenox
 
Posts: 2581
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Diaplan question, Hanging up call and setting specific s

Postby williamconley » Mon Mar 03, 2025 1:38 pm

many agi scripts in /var/lib/asterisk/agi-bin have the ability to alter lead data, to name a few:

* cm_dnc.agi
* cm_dnc_new.agi
* agi-set_variables.agi
* cm_status_dial.agi

Each of these has instructions at the top of the file.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20410
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: okli and 52 guests