Hello,

o Jeremy A [07/05/08 05:43]:
> Hello,
> 
> I'd like to send a SIP NOTIFY from a python script under the SEMS ivr 
> module.
> 
> After a bit of hunting around it's not apparent to me how to do this 'in 
> process'. I guess I can use sipsak, but a clean self-contained method is 
> preferable.
> 
> Any suggestions appreciated.

you need to add a function sendRequest to IvrDialogBase.cpp, like this:

static PyObject* IvrDialogBase_sendRequest(IvrDialogBase* self, PyObject*)
{

   char* method=0;
   char* content_type=0;
   char* body=0;
   char* hdrs=0;


   if(!PyArg_ParseTuple(args,"ssss",&method, &content_type, &body, &hdrs))
     return NULL;

   assert(self->p_dlg);
   self->p_dlg->sendRequest(method, content_type, body, hdrs);
   Py_INCREF(Py_None);
   return Py_None;
}

and register it in IvrDialogBase_methods.

you get the reply then in onSipReply event handler.

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