[asterisk-dev] SMDI on 1.6.0-beta5
Russell Bryant
russell at digium.com
Mon Mar 10 17:12:01 CDT 2008
Russell Bryant wrote:
> Bill Sofko wrote:
>> Perhaps I have misunderstood Russell. If he's proposing that he'll simply
>> add a function that searches on message desk terminal, then you'll get no
>> objection from me as I'll gladly trade the time of making a couple of
>> modifications to my dial plan for that needed to code up the requisite c
>> code :-). I was thinking that he was suggesting the modifications as
>> something I could do. As I was looking at what was needed I thought it not
>> hard to add the mapping code directly, which makes the dial plan interface
>> cleaner.
>
> Yeah, I don't mind doing it. I'll post back here after I finish. I don't think
> it will be too bad ... we'll see.
Ok, done, but I haven't tested it. ;)
The code is in a developer branch:
svn co http://svn.digium.com/svn/asterisk/team/russell/smdi-msg-searching
I changed the arguments to SMDI_MSG_RETRIEVE() in a backwards compatible way
that adds this new functionality. If you set the 't' or 'n' option, you can
control which field is used to search for SMDI messages.
-= Info about function 'SMDI_MSG_RETRIEVE' =-
[Syntax]
SMDI_MSG_RETRIEVE(<smdi port>,<search key>[,timeout[,options]])
[Synopsis]
Retrieve an SMDI message.
[Description]
This function is used to retrieve an incoming SMDI message. It returns
an ID which can be used with the SMDI_MSG() function to access details of
the message. Note that this is a destructive function in the sense that
once an SMDI message is retrieved using this function, it is no longer in
the global SMDI message queue, and can not be accessed by any other Asterisk
channels. The timeout for this function is optional, and the default is
3 seconds. When providing a timeout, it should be in milliseconds.
The default search is done on the forwarding station ID. However, if
you set one of the search key options in the options field, you can change
this behavior.
Options:
t - Instead of searching on the forwarding station, search on the message
desk terminal, instead.
n - Instead of searching on the forwarding station, search on the message
desk number, instead.
--
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.
More information about the asterisk-dev
mailing list