A-leg hangup cause is blank
Hi all, To be simple, I am trying to play around with hangup causes and see what I get in my environment. I must have a pretty shy set up because FS never discloses any hangup cause… It's continuously blank. This is what I have before my bridge action: <action application="set" data="api_hangup_hook=system /root/hangup_cause.sh ${hangup_cause} ${hangup_cause_q850}" /> My shell script just stores the hangup_cause I get in a file. Ideally, I am trying to achieve the following: 1. User a calls user b; user a hangs up before user b picks up; I get a hangup_cause that is relevant and I can notify user b of a missed call. 2. User a calls user b; call goes to Voicemail; user a hangs up without recording a message; I get a hangup_cause that is relevant and I can notify user b of a missed call. And so on and so forth. With Asterisk, I would get channel statuses like NOANSWER, CHANUNAVAIL, CANCEL… and could act upon them. How do I get my FS to talk to me and give me some hangup_cause for my a-leg? Thanks a bunch for all your help, Emrah
Hi guys, It makes sense that hangup_cause is blank because at the time the variable is set, the channel hasn't been hanged-up… What can be done to have this set post-hangup? Thanks a bunch and all the best, Emrah On Nov 3, 2012, at 1:06 AM, Emrah <lists@kavun.ch> wrote:
Hi all,
To be simple, I am trying to play around with hangup causes and see what I get in my environment. I must have a pretty shy set up because FS never discloses any hangup cause… It's continuously blank. This is what I have before my bridge action: <action application="set" data="api_hangup_hook=system /root/hangup_cause.sh ${hangup_cause} ${hangup_cause_q850}" />
My shell script just stores the hangup_cause I get in a file.
Ideally, I am trying to achieve the following:
1. User a calls user b; user a hangs up before user b picks up; I get a hangup_cause that is relevant and I can notify user b of a missed call. 2. User a calls user b; call goes to Voicemail; user a hangs up without recording a message; I get a hangup_cause that is relevant and I can notify user b of a missed call.
And so on and so forth.
With Asterisk, I would get channel statuses like NOANSWER, CHANUNAVAIL, CANCEL… and could act upon them. How do I get my FS to talk to me and give me some hangup_cause for my a-leg?
Thanks a bunch for all your help, Emrah
On Mon, Nov 5, 2012 at 1:01 PM, Emrah <lists@kavun.ch> wrote:
It makes sense that hangup_cause is blank because at the time the variable is set, the channel hasn't been hanged-up…
Depending on what you're doing, you may have to look to the CS_REPORTING state. This is where you get your CDRs written out to disk, HTTP, DB or whatever. http://wiki.freeswitch.org/wiki/Channel_States Is listening on the event socket an option? How about watching for CDRs to be written to disk? Good luck, Gabe
Hey Gabe, thanks for these suggestions. I actually found out that a LUA script that is called in a hangup hook will receive the the full landscape of the env variables, including the hangup_cause. Thanks a bunch, I'm glad I escaped your famous replies. :P Cheers, Emrah On Nov 6, 2012, at 1:33 AM, Gabriel Gunderson <gabe@gundy.org> wrote:
On Mon, Nov 5, 2012 at 1:01 PM, Emrah <lists@kavun.ch> wrote:
It makes sense that hangup_cause is blank because at the time the variable is set, the channel hasn't been hanged-up…
Depending on what you're doing, you may have to look to the CS_REPORTING state. This is where you get your CDRs written out to disk, HTTP, DB or whatever.
http://wiki.freeswitch.org/wiki/Channel_States
Is listening on the event socket an option? How about watching for CDRs to be written to disk?
Good luck, Gabe
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
Emrah
-
Gabriel Gunderson