On 3/22/07, Tony Mountifield <[EMAIL PROTECTED]> wrote:
In article <[EMAIL PROTECTED]>,
Sven Jacobs <[EMAIL PROTECTED]> wrote:
> Dear Asterisk developers,
>
> I'm currently writing an application which displays incoming calls in a
> popup window. The application connects to an Asterisk 1.4 server via the
> Manager API and listens for dial events.
>
> On the Asterisk side I want to enrich the SI protocol with an additional
> custom header which contains, for example, the extension which has been
> dialed by using the SIPAddHeader() command in the dial plan.
>
> The client application should display the following information on an
> incoming call:
>
> From: <CALLERID(name)>
> Number: <CALLERID(num)>
> To: <X-CUSTOMHEADER(extension)>
> Date: <NOW>
>
> The question is whether it's possible to extract custom headers from the
> Manager API? The dial event does not contain such information.
Look at the UserEvent dialplan application, e.g.
exten => _X.,n,UserEvent(SIP|SIPHdr: ${YOURSIPHEADER})
You would probably put this just before your Dial() statement.
Then you could watch for this event over the AMI and store the header
against the channel.
Hope this helps.
Cheers
Tony
--
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - http://tony.mountifield.org
Could this be used to extract the service identifier IE from an IAX
channel? Something like
exten => _X.,n,UserEvent(IAX|IAXHdr: ${IAX_IE_SERVICEIDENT})
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev