The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: xAP Asterisk integration



Ove Jacobsson wrote:

> I have successfully used this with xAPSwitchboard.
>
> I want to expand this script to send xAP messages when an outgoing
> call is made and also if the call is answered or busy. That info can
> then be logged by xAPSwitchboard. I will look into this but I’m having
> a hard time to understand all the aspects of Asterisk.
>
Ove,

Perhaps we could collaborate on your AGI off-list if you have interest.
I'm guessing that the "aspects of Asterisk" that may be an issue
for you
is how to trap on the applicable part of the extension for events like
answered, not answered, etc. That's fairly easy to deal w/ using the
DIALSTATUS channel variable and using a Goto command. For example,

exten => s, 1, Dial([dialargs])
exten => s, 2, Goto(s-${DIALSTATUS},1)

exten => s-NOANSWER, 1,
AGI([youragi],"Outgoing","CallNotAnswered")

exten =>
s-ANSWER,1,AGI([youragi],"Outgoing","CallAnswered")

Which would pass the 2 args into "youragi" (whatever it might be
called)
that can be used to determine which schema to send on. A couple of
"tricky" points, though...:

1) # of rings. Arguably, this is kinda pointless--especially for
asterisk. You could determine a number based on the noanswer timeout for
the noanswer situation. Otherwise, just set an arbitrary number (0 or 1?)
2) duration. AFAIK, you can't get this through the AGI. Since it really
would be useful for certain logging, then my suggestion is to move
toward a standalone application (outside of *) that communicates w/ your
AGIs on some port. You could use the UNIQUEID channel var as a basis for
sending a start (i.e., dial) event and then end event. This means
restructuring the AGIs, however, so that they talk to the standalone
application (preferably a * manager interface app) and allowing this app
to send out the xAP messages. Arguably, this is a much better design
anyway since a standalone app could also transmit periodic heartbeat
messages.

On a final note, trapping on various dialstatus events for this specific
case as well as others (especially, IVR menus) might be better suited
via AEL rather than the conventional extension grammar above. That's
especially true if you have a c/perl/etc background. I'm kinda thinking
that any usage "docs" for AGIs are really sample extension
"snippets"
(like above) and might be expressed in both formats.

Gregg

> Ove
>
>
------------------------------------------------------------------------
>
> *From:* xap_automation@xxxxxxx
> [mailto:xap_automation@xxxxxxx] *On
Behalf Of *Paul Gale
> *Sent:* Wednesday, July 20, 2005 2:43 PM
> *To:* xap_automation@xxxxxxx
> *Subject:* RE: [xap_automation] xAP Asterisk integration
>
> That looks interesting – thanks.
>
> Kevin/James – would this work with xAPSwitchBoard?
>
> Paul.
>
>
------------------------------------------------------------------------
>
> *From:* xap_automation@xxxxxxx
> [mailto:xap_automation@xxxxxxx] *On
Behalf Of *Ove Jacobsson
> *Sent:* 20 July 2005 13:36
> *To:* xap_automation@xxxxxxx
> *Subject:* RE: [xap_automation] xAP Asterisk integration
>
> Hi Paul.
>
> I have just started to convert an AGI-script included with
> Asterisk@home to send xAP messages instead of xPL-messages. It is very
> basic and don’t send out heartbeats yet, only the CID.incoming message
> when there is an incoming call to Asterisk.
>
> See http://jany.cjb.net/ove/asterisk.htm
for more info and download of
> the AGI-script.
>
> Ove.
>
>
------------------------------------------------------------------------
>
> <-- Original message -->
>
> Is anyone in a position to be able to look at writing some xAP support
> for Asterisk?
>
> I know Patrick Lidstone did something a while ago but he seems to have
> disappeared without trace L
>
> Many thanks,
>
> Paul.
>
>
------------------------------------------------------------------------
>
>
>
>
------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
>     * Visit your group "xap_automation
>       <http://groups.yahoo.com/group/xap_automation>"
on the web.
>     * To unsubscribe from this group, send an email to:
>       xap_automation-unsubscribe@xxxxxxx
>       <mailto:xap_automation-unsubscribe@xxxxxxx?subject=Unsubscribe>
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>
>
------------------------------------------------------------------------
>







xAP_Automation Main Index | xAP_Automation Thread Index | xAP_Automation Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.