Re: [asterisk-users] Local channel usage
On Tue, 22 Jun 2010, Philipp von Klitzing wrote: Here's an example for Voicemail live that uses such a technique: http://www.voip-info.org/wiki/view/Asterisk+tips+voicemail+live A great example. If I ever get around to setting up a home Asterisk server, I'm sure this will help with the WAF. It looks like you may have a couple of bugs in your AGIs: //read the standard agi variables while (!feof($in)) { $temp = str_replace(\n,,fgets($in,4096)); $s = split(:,$temp); $agi[str_replace(agi_,,$s[0])] = trim($s[1]); if (($temp == ) || ($temp == \n)) { break; } } The tests for $temp being empty should be before the split. If you execute the script from the command line, the PHP interpreter will complain about $s[1]. Also in your __read__() and __write__() functions: function __write__($line) { global $debug; if ($debug) echo VERBOSE \write: $line\\n; print $line.\n; } If $debug is set, you issue the agi VERBOSE request but you do not read the response. This violates the AGI protocol and leaves the response hanging in STDIN where it is subsequently read by the GET VARIABLE request. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Local channel usage
Hi All, I’m trying to do “things” after my Dial application terminates (e.g. play IVR to called party, calling party, etc.). I’m trying to use the local channel for this purpose but so far with no success. I’m using 1.6.1.18 and this is my extensions.conf: [Internal] exten = _22,1,Dial(Local/${ext...@cw/n) ; 22 is test number exten = _22,2,Noop(After Hangup) [CW] exten = _x.,1,Dial(SIP/307) exten = _x.,2,Noop(After Hangup) The call never reaches neither of the Noop applications. Consol: == Using SIP RTP CoS mark 5 == Using UDPTL CoS mark 5 -- Executing [...@internal:1] Dial(SIP/309-00a5, Local/2...@cw/n) in new stack -- Called 2...@cw/n -- Executing [...@cw:1] Dial(Local/2...@cw-af6f;2, SIP/307) in new stack == Using SIP RTP CoS mark 5 == Using UDPTL CoS mark 5 -- Called 307 -- SIP/307-00a6 is ringing -- Local/2...@cw-af6f;1 is ringing -- SIP/307-00a6 is ringing -- SIP/307-00a6 is ringing -- SIP/307-00a6 is ringing -- SIP/307-00a6 answered Local/2...@cw-af6f;2 -- Local/2...@cw-af6f;1 answered SIP/309-00a5 == Spawn extension (CW, 22, 1) exited non-zero on 'Local/2...@cw-af6f;2' == Spawn extension (Internal, 22, 1) exited non-zero on 'SIP/309-00a5' If I use the ‘g’ option in my Dial() both Noop will be run only if the called party hang-up first. I need a simple continuation in the dial plan regardless of who disconnected the call. Thanks in advance Harel -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Local channel usage
Hi, After a Dial, the call is hung up. It doesn't carry on with dialplan unless you specify the appropriate dial option. Check wiki voip-info for cmd Dial, I think the option is g 2010/6/22 Harel Cohen ha...@easycall.gi Hi All, I’m trying to do “things” after my Dial application terminates (e.g. play IVR to called party, calling party, etc.). I’m trying to use the local channel for this purpose but so far with no success. I’m using 1.6.1.18 and this is my extensions.conf: [Internal] exten = _22,1,Dial(Local/${ext...@cw/n) ; 22 is test number exten = _22,2,Noop(After Hangup) [CW] exten = _x.,1,Dial(SIP/307) exten = _x.,2,Noop(After Hangup) The call never reaches neither of the Noop applications. Consol: == Using SIP RTP CoS mark 5 == Using UDPTL CoS mark 5 -- Executing [...@internal:1] Dial(SIP/309-00a5, Local/2...@cw/n) in new stack -- Called 2...@cw/n -- Executing [...@cw:1] Dial(Local/2...@cw-af6f;2, SIP/307) in new stack == Using SIP RTP CoS mark 5 == Using UDPTL CoS mark 5 -- Called 307 -- SIP/307-00a6 is ringing -- Local/2...@cw-af6f;1 is ringing -- SIP/307-00a6 is ringing -- SIP/307-00a6 is ringing -- SIP/307-00a6 is ringing -- SIP/307-00a6 answered Local/2...@cw-af6f;2 -- Local/2...@cw-af6f;1 answered SIP/309-00a5 == Spawn extension (CW, 22, 1) exited non-zero on 'Local/2...@cw-af6f;2' == Spawn extension (Internal, 22, 1) exited non-zero on 'SIP/309-00a5' If I use the ‘g’ option in my Dial() both Noop will be run only if the called party hang-up first. I need a simple continuation in the dial plan regardless of who disconnected the call. Thanks in advance Harel -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Local channel usage
'g' option continues the dial plan after the call has been answered, not after it is hung up. Depending upon what you are trying to do, first try to use h extension, i.e. in the example you gave, you should replace '_22,2' with 'h,1'. Zeeshan A Zakaria -- www.ilovetovoip.com On 2010-06-22 6:23 AM, Tiago Geada tiago.ge...@gmail.com wrote: Hi, After a Dial, the call is hung up. It doesn't carry on with dialplan unless you specify the appropriate dial option. Check wiki voip-info for cmd Dial, I think the option is g 2010/6/22 Harel Cohen ha...@easycall.gi Hi All, I’m trying to do “things” after my Dial application terminates (e.g. play IVR to cal... -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Local channel usage
Zeeshan: 1. g option continues the dial plan after the called party hangup, and only the called party. See the manual or check for yourself... 2. h extension is no good for me because the voice path is already closed at this point therefore I cannot play IVR (Im getting Warnings like: file.c:750 ast_readaudio_callback: Failed to write frame). Tiago: There is no Dial() option to simply continue dial-plan after Dial(). See above regarding g option. Can anyone think of a way to play IVR after conversation initiated by Dial() terminates? Harel -- Message: 9 Date: Tue, 22 Jun 2010 07:27:42 -0400 From: Zeeshan Zakaria zisha...@gmail.com Subject: Re: [asterisk-users] Local channel usage To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Message-ID: aanlktilo2hzyq4jp7rb_iguzaq-n2chxnhq96grg0...@mail.gmail.com Content-Type: text/plain; charset=windows-1252 'g' option continues the dial plan after the call has been answered, not after it is hung up. Depending upon what you are trying to do, first try to use h extension, i.e. in the example you gave, you should replace '_22,2' with 'h,1'. Zeeshan A Zakaria -- www.ilovetovoip.com On 2010-06-22 6:23 AM, Tiago Geada tiago.ge...@gmail.com wrote: Hi, After a Dial, the call is hung up. It doesn't carry on with dialplan unless you specify the appropriate dial option. Check wiki voip-info for cmd Dial, I think the option is g 2010/6/22 Harel Cohen ha...@easycall.gi Hi All, I?m trying to do ?things? after my Dial application terminates (e.g. play IVR to cal... -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Local channel usage
Hi! Can anyone think of a way to play IVR after conversation initiated by Dial() terminates? You will most probably have to prevent the hangup to happen in the first place: You could, for example, join the two callers by the help of a dynamic MeetMe room, and then take action when the other parties leaves, i.e. kick the remaining user out of the room and continue in the dialplan. Here's an example for Voicemail live that uses such a technique: http://www.voip-info.org/wiki/view/Asterisk+tips+voicemail+live Another way *might* be to involve a local channel for the calling party with the /n option to prevent it from optimizing themselves away: For example: The caller's SIP channel hangs up, but the local channel that it is connected with then continues in the dialplan? Not sure if there is a way to make this work - could be that you need to twist things badly so that also the caller is in fact a callee to the local channel... Finally: Put a SIP proxy in between that catches the hangup and then takes action like a redirect (transfer). Philipp -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Local channel usage
I'll sure look at the 'g' option tomorrow when back at work, as I am using it on a production system. MeetMe is a good way to accomplish this, I've done it several times though a little tricky, but works great. Another idea could be to use option M^ and send the call to a macro and write a macro to handle the call after it is hung up. There is also an option 'b' which opens up an agi script. I once used it but gave up because if I remember correctly it ran the agi in parallel with the dial command. Zeeshan A Zakaria -- www.ilovetovoip.com On 2010-06-22 1:08 PM, Philipp von Klitzing klitz...@pool.informatik.rwth-aachen.de wrote: Hi! Can anyone think of a way to play IVR after conversation initiated by Dial() terminates? You will most probably have to prevent the hangup to happen in the first place: You could, for example, join the two callers by the help of a dynamic MeetMe room, and then take action when the other parties leaves, i.e. kick the remaining user out of the room and continue in the dialplan. Here's an example for Voicemail live that uses such a technique: http://www.voip-info.org/wiki/view/Asterisk+tips+voicemail+live Another way *might* be to involve a local channel for the calling party with the /n option to prevent it from optimizing themselves away: For example: The caller's SIP channel hangs up, but the local channel that it is connected with then continues in the dialplan? Not sure if there is a way to make this work - could be that you need to twist things badly so that also the caller is in fact a callee to the local channel... Finally: Put a SIP proxy in between that catches the hangup and then takes action like a redirect (transfer). Philipp -- _ -- Bandwidth and Colocation Pr... -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users