<meta charset="utf-8"><div>>What should i do to finish the macro if this macro reachs the Hangup?</div><div><br></div><div>I tried to say: "What should i do to finish the <b><u>AGI</u></b> if this macro reachs the Hangup?"</div>
<br><div class="gmail_quote">2010/9/2 Danny Dias <span dir="ltr"><<a href="mailto:ing.diasdanny@gmail.com">ing.diasdanny@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello Steven...<div><br></div><div>Sorry for my poor explanation...what i'm trying to do is to invoke a Macro from my AGI, like this:</div><div><br></div><div>$agi->exec("Macro","check-call-limit");</div>
<div><br></div><div>If the Macro checks that the group_name is bigger than a number specified for every peer with setvar it should Hangup the call (frobidden,1 in the Gotoif...) but this is not happening, the AGI always continue with is process and it doesn´t play attention to the Hangup in the macro, the macro is here:</div>
<div><br></div><div><div>[macro-check-call-limit]</div><div>exten => s,1,Set(group_name=out_calls_user_${SIPCHANINFO(peername)})</div><div>exten => s,n,Set(GROUP()=${group_name})</div><div>exten => s,n,GotoIf($[${GROUP_COUNT(${group_name})} > ${MAX_OUT_CALLS_PER_USER}] forbidden,1)</div>
<div>; EXITO:</div><div>exten => s,n,MacroExit</div><div>; FRACASO:</div><div>exten => forbidden,1,NoOp(*** llamada saliente bloqueada: el usuario ${SIPCHANINFO(peername)} tiene actualmente ${MATH(${GROUP_COUNT(${group_name})})-1,int)} llamadas salientes)</div>
<div>exten => forbidden,n,Hangup(21) ; ISUP 21 = SIP 403 (Forbidden)</div></div><div><br></div><div><br></div><div>What should i do to finish the macro if this macro reachs the Hangup?</div><div><br></div><div>Thanks for your help my friend!</div>
<div><br></div><div><br></div><div><div class="gmail_quote">2010/9/2 Steve Edwards <span dir="ltr"><<a href="http://asterisk.org" target="_blank">asterisk.org</a>@<a href="http://sedwards.com" target="_blank">sedwards.com</a>></span><div>
<div></div><div class="h5"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Thu, 2 Sep 2010, Danny Dias wrote:<br>
<br>
> I need to finish an AGI script when it invokes a macro from dialplan,<br>
> how can i do that? it's quite confusing...the macro is making a hangup<br>
> but the script continues....<br>
<br>
</div>I don't understand your question, but I'm guessing it has something to do<br>
with:<br>
<br>
1) How to continue an AGI if a hangup occurs during execution -- trap HUP.<br>
<br>
2) How to execute an AGI after a hangup -- use deadagi() in the h<br>
extension<br>
<br>
3) The AGI is invoking a macro -- I have no clue with the level of detail<br>
provided.<br>
<font color="#888888"><br>
--<br>
Thanks in advance,<br>
-------------------------------------------------------------------------<br>
Steve Edwards <a href="mailto:sedwards@sedwards.com" target="_blank">sedwards@sedwards.com</a> Voice: +1-760-468-3867 PST<br>
Newline Fax: +1-760-731-3000<br>
</font><div><div></div><div><br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div></div></div><br><br clear="all"><br>-- <br>Salu2<br><span></span><br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Salu2<br><span></span><br>