Hi all, I would like to run my perl agi script when the call is hungup. I did one script to calculate calling balance and duration. I made one timer Where the dialstaus is Answered But i am am in confiuse how i can stop my timer when the dialstus will be hangup. Please give me an advice to solve my problem. -- Best Regards, Code Lover Computer Programmer Mobile No. : +974 - 5405022 ICQ : 276-994-704 YM! : abdul_zu@yahoo.com MSN : abdulzu@hotmail.com Google Talk : lateef.np@gmail.com
Hi all, How i can call my perl agi script when the call is hungup. Because i am making some external Cdr calculation. -- Best Regards, Abdul Lateef Khan Computer Programmer Mobile No. : +974 - 5405022 ICQ : 276-994-704 YM! : abdul_zu@yahoo.com MSN : abdulzu@hotmail.com Google Talk : lateef.np@gmail.com
Hi, I use an E1-Board to hand the calls over to internal SIP-Clients. My Question is which Dialstatus is set when the SIP-client is unreachable. I tried with NOANSWER but does not seem to be suitable. Does anyone of you have a solution? In voip-info.org wiki there is a Dialstatus CHANUNAVAIL but this is explained by " Channel unavailable. On SIP, peer may not be registered.". So this seems not to be right, or does it? TIA, Christophorus -------------- next part -------------- A non-text attachment was scrubbed... Name: bob.vcf Type: text/x-vcard Size: 296 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20060606/df8f06c7/bob.vcf
Wether the SIP client is not registered or does not exists at all you will get CHANUNAVAIL. Regards On 6/6/06, Christophorus Laube <bob@semanticedge.de> wrote:> Hi, > > I use an E1-Board to hand the calls over to internal SIP-Clients. My > Question is which Dialstatus is set when the SIP-client is unreachable. > I tried with NOANSWER but does not seem to be suitable. > Does anyone of you have a solution? > In voip-info.org wiki there is a Dialstatus CHANUNAVAIL but this is > explained by " Channel unavailable. On SIP, peer may not be > registered.". So this seems not to be right, or does it? > TIA, Christophorus > > > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > > >-- "Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
I tried with CHANUNAVAIL but I was not successful. I want to try to call a SIP client. If it is not answering and cannot be found I want wo call someone else. How can I do that? NOANSWER and CHANUNAVAIL do not work out.> Wether the SIP client is not registered or does not exists at all you > will get CHANUNAVAIL. > > Regards > > On 6/6/06, Christophorus Laube <bob@semanticedge.de> wrote: >> Hi, >> >> I use an E1-Board to hand the calls over to internal SIP-Clients. My >> Question is which Dialstatus is set when the SIP-client is unreachable. >> I tried with NOANSWER but does not seem to be suitable. >> Does anyone of you have a solution? >> In voip-info.org wiki there is a Dialstatus CHANUNAVAIL but this is >> explained by " Channel unavailable. On SIP, peer may not be >> registered.". So this seems not to be right, or does it? >> TIA, Christophorus >> >> >> >> _______________________________________________ >> --Bandwidth and Colocation provided by Easynews.com -- >> >> Asterisk-Users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users >> >> >> >> > > > -- > "Su nombre es GNU/Linux, no solamente Linux, mas info en > http://www.gnu.org" > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
this is what I have, and it works on Asterisk-1.2.1 [macro-sipextens] exten => s,1,Macro(validate_extension) exten => s,2,Dial(SIP/${sipprefix}${num},${calltimeout}|${calloptions}) exten => s,3,Macro(catch_dial_response,${DIALSTATUS}) so, After Dial, I catch the dial response, and heres the catch macro [macro-catch_dial_response] exten => s,1,GotoIf($[${ARG1} = NOANSWER] ? 11 : 2) exten => s,2,GotoIf($[${ARG1} = CHANUNAVAIL] ? 22 : 3) exten => s,3,GotoIf($[${ARG1} = BUSY] ? 33 : 4) exten => s,4,Macro(generic_handler) exten => s,11,Macro(noanswer_handler) exten => s,22,Macro(unavail_handler) exten => s,33,Macro(busy_handler) FInally here are the 4 other macros [macro-noanswer_handler] exten => s,1,SetCDRUserField(-10/${agi_cdr_id}) exten => s,2,Set(voicemail_flags=u) exten => s,3,Playback(iss_noanswer_channel_${defaultlang}) exten => s,4,Goto(loopback_ivr,s,1) [macro-unavail_handler] exten => s,1,SetCDRUserField(-11/${agi_cdr_id}) exten => s,2,Set(voicemail_flags=u) exten => s,3,GotoIf($[foo${is_exten} = foo] ? 4 : 6) exten => s,4,Playback(iss_unavailable_channel_${defaultlang}) exten => s,5,Goto(loopback_ivr,s,1) exten => s,6,Playback(iss_unavailable_extension_${defaultlang}) exten => s,7,Goto(loopback_ivr,s,1) [macro-busy_handler] exten => s,1,SetCDRUserField(-12/${agi_cdr_id}) exten => s,2,Set(voicemail_flags=b) exten => s,3,Playback(iss_busy_channel_${defaultlang}) exten => s,4,Goto(loopback_ivr,s,1) [macro-generic_handler] exten => s,1,SetCDRUserField(-14/${agi_cdr_id}) exten => s,2,Set(voicemail_flags=u) exten => s,3,GotoIf($[foo${is_exten} = foo] ? 4 : 6) exten => s,4,Playback(iss_unavailable_channel_${defaultlang}) exten => s,5,Goto(loopback_ivr,s,1) exten => s,6,Playback(iss_unavailable_extension_${defaultlang}) exten => s,7,Goto(loopback_ivr,s,1) If you cant get it working, simply do something like this: [test] exten => _XX,1,Answer() exten => _XX,2,Dial(SIP/${EXTEN}) exten => _XX,3,NoOp(${DIALSTATUS}) That will tell you what status is generated. Regards On 6/6/06, bob@semanticedge.de <bob@semanticedge.de> wrote:> I tried with CHANUNAVAIL but I was not successful. I want to try to call a > SIP client. If it is not answering and cannot be found I want wo call > someone else. > How can I do that? NOANSWER and CHANUNAVAIL do not work out. > > Wether the SIP client is not registered or does not exists at all you > > will get CHANUNAVAIL. > > > > Regards > > > > On 6/6/06, Christophorus Laube <bob@semanticedge.de> wrote: > >> Hi, > >> > >> I use an E1-Board to hand the calls over to internal SIP-Clients. My > >> Question is which Dialstatus is set when the SIP-client is unreachable. > >> I tried with NOANSWER but does not seem to be suitable. > >> Does anyone of you have a solution? > >> In voip-info.org wiki there is a Dialstatus CHANUNAVAIL but this is > >> explained by " Channel unavailable. On SIP, peer may not be > >> registered.". So this seems not to be right, or does it? > >> TIA, Christophorus > >> > >> > >> > >> _______________________________________________ > >> --Bandwidth and Colocation provided by Easynews.com -- > >> > >> Asterisk-Users mailing list > >> To UNSUBSCRIBE or update options visit: > >> http://lists.digium.com/mailman/listinfo/asterisk-users > >> > >> > >> > >> > > > > > > -- > > "Su nombre es GNU/Linux, no solamente Linux, mas info en > > http://www.gnu.org" > > _______________________________________________ > > --Bandwidth and Colocation provided by Easynews.com -- > > > > Asterisk-Users mailing list > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- "Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
Check out this example dialplan: http://pastebin.ca/19456 That should give you everything you need. bp On 6/6/06, Moises Silva <moises.silva@gmail.com> wrote:> > this is what I have, and it works on Asterisk-1.2.1 > > [macro-sipextens] > exten => s,1,Macro(validate_extension) > exten => s,2,Dial(SIP/${sipprefix}${num},${calltimeout}|${calloptions}) > exten => s,3,Macro(catch_dial_response,${DIALSTATUS}) > > so, After Dial, I catch the dial response, and heres the catch macro > > [macro-catch_dial_response] > exten => s,1,GotoIf($[${ARG1} = NOANSWER] ? 11 : 2) > exten => s,2,GotoIf($[${ARG1} = CHANUNAVAIL] ? 22 : 3) > exten => s,3,GotoIf($[${ARG1} = BUSY] ? 33 : 4) > exten => s,4,Macro(generic_handler) > exten => s,11,Macro(noanswer_handler) > exten => s,22,Macro(unavail_handler) > exten => s,33,Macro(busy_handler) > > FInally here are the 4 other macros > [macro-noanswer_handler] > exten => s,1,SetCDRUserField(-10/${agi_cdr_id}) > exten => s,2,Set(voicemail_flags=u) > exten => s,3,Playback(iss_noanswer_channel_${defaultlang}) > exten => s,4,Goto(loopback_ivr,s,1) > > [macro-unavail_handler] > exten => s,1,SetCDRUserField(-11/${agi_cdr_id}) > exten => s,2,Set(voicemail_flags=u) > exten => s,3,GotoIf($[foo${is_exten} = foo] ? 4 : 6) > exten => s,4,Playback(iss_unavailable_channel_${defaultlang}) > exten => s,5,Goto(loopback_ivr,s,1) > exten => s,6,Playback(iss_unavailable_extension_${defaultlang}) > exten => s,7,Goto(loopback_ivr,s,1) > > [macro-busy_handler] > exten => s,1,SetCDRUserField(-12/${agi_cdr_id}) > exten => s,2,Set(voicemail_flags=b) > exten => s,3,Playback(iss_busy_channel_${defaultlang}) > exten => s,4,Goto(loopback_ivr,s,1) > > [macro-generic_handler] > exten => s,1,SetCDRUserField(-14/${agi_cdr_id}) > exten => s,2,Set(voicemail_flags=u) > exten => s,3,GotoIf($[foo${is_exten} = foo] ? 4 : 6) > exten => s,4,Playback(iss_unavailable_channel_${defaultlang}) > exten => s,5,Goto(loopback_ivr,s,1) > exten => s,6,Playback(iss_unavailable_extension_${defaultlang}) > exten => s,7,Goto(loopback_ivr,s,1) > > > If you cant get it working, simply do something like this: > > [test] > exten => _XX,1,Answer() > exten => _XX,2,Dial(SIP/${EXTEN}) > exten => _XX,3,NoOp(${DIALSTATUS}) > > That will tell you what status is generated. > > Regards > > > On 6/6/06, bob@semanticedge.de <bob@semanticedge.de> wrote: > > I tried with CHANUNAVAIL but I was not successful. I want to try to call > a > > SIP client. If it is not answering and cannot be found I want wo call > > someone else. > > How can I do that? NOANSWER and CHANUNAVAIL do not work out. > > > Wether the SIP client is not registered or does not exists at all you > > > will get CHANUNAVAIL. > > > > > > Regards > > > > > > On 6/6/06, Christophorus Laube <bob@semanticedge.de> wrote: > > >> Hi, > > >> > > >> I use an E1-Board to hand the calls over to internal SIP-Clients. My > > >> Question is which Dialstatus is set when the SIP-client is > unreachable. > > >> I tried with NOANSWER but does not seem to be suitable. > > >> Does anyone of you have a solution? > > >> In voip-info.org wiki there is a Dialstatus CHANUNAVAIL but this is > > >> explained by " Channel unavailable. On SIP, peer may not be > > >> registered.". So this seems not to be right, or does it? > > >> TIA, Christophorus > > >> > > >> > > >> > > >> _______________________________________________ > > >> --Bandwidth and Colocation provided by Easynews.com -- > > >> > > >> Asterisk-Users mailing list > > >> To UNSUBSCRIBE or update options visit: > > >> http://lists.digium.com/mailman/listinfo/asterisk-users > > >> > > >> > > >> > > >> > > > > > > > > > -- > > > "Su nombre es GNU/Linux, no solamente Linux, mas info en > > > http://www.gnu.org" > > > _______________________________________________ > > > --Bandwidth and Colocation provided by Easynews.com -- > > > > > > Asterisk-Users mailing list > > > To UNSUBSCRIBE or update options visit: > > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > > > > > > _______________________________________________ > > --Bandwidth and Colocation provided by Easynews.com -- > > > > Asterisk-Users mailing list > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > > -- > "Su nombre es GNU/Linux, no solamente Linux, mas info en > http://www.gnu.org" > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060606/697ad39d/attachment.htm