[asterisk-dev] Implementing MWI for Definity PBX served by Asterisk VoiceMail
John R. Covert
covert at covert.org
Thu Feb 3 22:43:26 CST 2011
Thanks again, Richard.
I'm ready to announce a BOUNTY: $250 ($375 if completed by 3pm
Friday 4 Feb) with a possible additional $125 bonus for the
following:
Given a standard installation of libpri-1.4.12-beta3 and
asterisk-1.8.2.3 and a PRI span:
switchtype = qsig
signalling = pri_cpe
channel => 1-23
deliver a single tested c source module which implements:
A Dialplan function: MWImessageSend(span, number, activate)
which calls mwi_message_send after whatever setup is required for
conversion of the arguments. "span" is either simply a span
number or a Dahdi channel on the span, "number" is the station
number to be sent in the message (variable # of digits, e.g.
12345 or 2212345), and "activate" is a 0 or 1 to pass as a
boolean to mwi_message_send.
Acceptance:
CLI> originate local/answer at default application MWImessageSend 1,12345,1
where the default context contains
exten => answer,1,Answer()
exten => answer,n,Wait(120)
With "pri set debug on span 1" it must be demonstrable that the
implementation works by observing the output and verifying
that the message built by mwi_message_send is sent. Building
it must be as simple as putting the single c module into the
asterisk app dir and typing make ; make install. There must
be copious comments in the source code.
Bonus $125 on top of the bounty above (possible increase to $500)
if the module compiles, runs, and without further modification,
immediately allows me to issue the CLI command above to turn
lights on and off on the specified Definity stations.
Payment: I'll send a check within three days. If you are in
Europe I can pay you by direct bank transfer in Sterling or
Euros at the exchange rate quoted by the Yahoo symbols
EURUSD=X or GBPUSD=X.
Note that I may not use this function in the final
implementation; I may simply take the code which sets up the
arguments to and work it into something else that is invoked via
ast_event_subscribe.
Note: The customer has sent a message stating that the Definity
documentation states "MWI accross a ISDN-PRI is done in a NCA-TSC
message."
Thanks and regards/john
On Thu, 3 Feb 2011 16:55:56 -0600 (CST) Richard Mudgett <rmudgett at digium.com>
wrote:
----- Original Message -----
> Thanks for your reply, Richard.
>
> >The events needed for using pri_mwi_indicate() are generated by the
> >Asterisk voicemail system. These events are subscribed to by the
> >channel
> >driver.
>
> How would you propose having the channel driver subscribe to all
> of the possible extensions in the remote PBX (possibly several
> thousand)? The current architecture seems to be targetted at a
The ast_event_subscribe() call specifies what kind of event you
want to get. The list of IE's in the parameter list are to narrow
down what event you are looking for. If you do not specify mailbox
but specify context in the sig_pri.c:sig_pri_start_pri() ast_event_subscribe()
call, you will get all mailbox MWI events for that context.
> small number of phones on a BRI channel, which is why the
> 1.4.12-beta3 version of pri_mwi_indicate has "if (!BRI_NT_PTMP(ctrl))
> {return -1;}"
The reason BRI_NT_PTMP() is checked is because libpri does not support
any other signaling mode at the present time for that feature.
> >I think you are really dealing with the MWIActivate/MWIDeactivate
> >messages
> >for PRI. The MWIActivate/MWIDeactivate messages are carried either by
> >a
> >REGISTER or FACILITY message.
>
> Given these parameters to mwi_message_send
>
> Encode and queue the Q.SIG MWIActivate/MWIDeactivate invoke message.
> D channel controller for diagnostic messages or global options.
> call Call leg to queue message.
> req Served user setup request information.
> activate Nonzero to do the activate message.
>
> D channel and activate are obvious. Is the call leg a dummy call, as
> with the others? The req is a pri_sr, which doesn't seem to be quite
> as simple as a pri_party_id. Any pointers, please, to how to construct
> this?
The mwi_message_send() is extremely Q.SIG specific. The req
parameter is the same parameter used by pri_setup() to initiate
calls. Q.SIG actually places a call to convey the message.
The call leg is a real call that is used for signaling
purposes only. Q.SIG uses SETUP like ETSI PRI uses REGISTER.
Both methods establish a signaling link between the endpoints
identified by the call reference.
The dummy call is used by Q.931 almost exclusively to send
FACILITY messages that are not associated with a call. Also,
the dummy call is mostly used for BRI PTMP mode. It is not
really used for PRI.
Richard
More information about the asterisk-dev
mailing list