<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
If this is the only real alternative, then in this instance I'll stick
with using the System command. Writing an AGI to execute two manager
commands in this case is even greater overkill than using the System
command.<br>
<br>
I understand that normally anything that calls multiple manager
commands would usually be something complex enough to justify an AGI.
The exception seems to be when you're dealing with cached realtime
data. (is it just me, or does that sound like a rather odd oxymoron?)<br>
<br>
<br>
ast guy wrote:<br>
<span style="white-space: pre;">> why don't you write an AGI which
talks to asterisk manager API 5038 port and executes the asterisk
commands. You execute asterisk command via agi not using system command<br>
><br>
> -ag<br>
><br>
> On Feb 11, 2008 11:24 AM, Rob Hillis <<a class="moz-txt-link-abbreviated" href="mailto:rob@hillis.dyndns.org">rob@hillis.dyndns.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:rob@hillis.dyndns.org"><mailto:rob@hillis.dyndns.org></a>> wrote:<br>
></span><br>
<blockquote type="cite">Hi guys,<br>
<br>
I've been working on a little dialplan fragment for roaming extensions,<br>
however the customer wants us to set the MWI indicator for the roaming<br>
extension that has just logged in. We're using MySQL realtime, so I've<br>
figured out that RealTimeUpdate will happily update the realtime<br>
database with the correct mailbox. My problem comes when I need to tell<br>
Asterisk to flush the realtime data for that extension and reload it so<br>
that the cached data is correct. Running the commands "sip prune<br>
realtime peer XXX" followed by "sip show peer XXX load" work fine from<br>
the Asterisk manager interface and correctly update the cached data so<br>
the MWI indicator works fine.<br>
<br>
What I want to know is if there is any better method of running manager<br>
API commands from within the dialplan than the horribly ugly<br>
System(asterisk -rx "sip prune realtime peer XXX") It works, but from<br>
my point of view, it's a somewhat nasty hack.<br>
<br>
Anyone have any suggestions?<br>
<br>
</blockquote>
<br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
<br>
<br>
<br>
<span style="white-space: pre;">> -------------------------<br>
<br>
> _______________________________________________<br>
> -- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a>
--<br>
<br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></span><br>
<br>
</body>
</html>