o Jeremy A [07/06/08 03:48]:
> Stefan Sayer wrote:
>> Hello,
>>
>> o Jeremy A [07/05/08 05:43]:
>>> I'd like to send a SIP NOTIFY from a python script under the SEMS ivr 
>>> module.
>>>
>> you need to add a function sendRequest to IvrDialogBase.cpp, like this:
>>
>> and register it in IvrDialogBase_methods.
>>
>> you get the reply then in onSipReply event handler.
> 
> 
> 
> Hello Stefan, thanks for this.
> 
> Reading the sources it appears to me that an AmSIPDialog::sendRequest is 
> sent to the other party in the call rather than the party in the headers 
> supplied.
> 
> What I am trying to do is notify a third party of an event triggered by 
> the IVR dialog. In addition I am not using a SUBSCRIBE/NOTIFY scheme - 
> simply a NOTIFY - which I believe is RFC compliant as used by MWI NOTIFY 
> - with application dependant data in the NOTIFY body.
> 
> My guess is I will have to set up a new AmSIPDialog object and use that 
> - plus spend a few days learning the intricacies of SEMS core - but I'm 

it shouldn't be *that* complicated. Have a look at AmSipDialog::transfer,
that function sends a hand-crafted non standard REFER with some extra 
headers
(Transfer-RR and Transfer-NH) to some other party. You will probably 
better set tmp_d.remote_tag="" or the NOTIFY will look like in-dialog. 
Apart from that, the same local tag and callid is used, so it is a 
little hacky, but it should work (you can change the callid, like 
tmp_d.callid=AmSession::getNewId();, but the localtag needs to stay the 
same so sems gives you the reply in your ivr dialog). Of course you will 
have to use *self->p_dlg instead of *this. Note: its _not_ self->p_dlg 
for the constructor (its not the 
AmSipDialog::AmSipDialog(AmSipDialogEventHandler* h) constructor), 
instead it is using the copy constructor.

> always hopeful there is an easier way.
if you don't care for the reply, use a new AmSipDialog, set callid, 
localtag, remote_party, local_party, send the request, and forget about 
the reply.

hth
Stefan

> 
> 
> Jeremy
> 
> _______________________________________________
> Sems mailing list
> [email protected]
> http://lists.iptel.org/mailman/listinfo/sems

-- 
Stefan Sayer
VoIP Services

[EMAIL PROTECTED]
www.iptego.com

iptego GmbH
Am Borsigturm 40
13507 Berlin
Germany

Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to