[asterisk-dev] Re: Read custom SIP header from Manager API?
Sven Jacobs
jacobs at tedsoft.de
Thu Mar 22 06:39:32 MST 2007
Hello Tony,
> 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.
thank you for your help! This sounds like good solution. Learning about
the UserEvent command I recognized that it's probably better if my
program does not listen for DialEvents but for a custom event, something
like:
exten => _X.,n,UserEvent(IncomingCall|callerName:
CALLERID(name)|callerNum: CALLERID(num)|extension: ${EXTEN})
Using the DialEvent my program would display every call, even outgoing
ones! It should only display incoming calls though. With a custom event
I can explicitly tell my tool what it should display. Of course, on the
other hand, there's more diaplan editing to consider.
--
Sincerely
Sven Jacobs
More information about the asterisk-dev
mailing list