Hi Jason,
i'm happy that it works for you. Can you please send your change as a
patch, so that i can include it into SVN? It could also ease people's
life for those wanting to port your changes to another version.
Thx,
Raphael.
Jason Penton wrote:
> Hi All,
>
> Raphael, thanks alot - worked perfectly.
>
> For those in the list that ever want to do a refer from a python
> script after a call has been setup, all you need to do is expose the
> refer() method through to the IVR module:
>
> a quick summary follows for those interested:
>
> Ivr.h: add: int refer(const string& target);
>
> Ivr.cpp: add:
> int IvrDialog::refer(const string& target)
> {
> return dlg.refer(target);
> }
>
> IvrDialogBase.cpp: add function:
> static PyObject*
> IvrDialogBase_refer(IvrDialogBase *self, PyObject* args)
> {
> assert(self->p_dlg);
>
> char* refer_to=0;
> if(!PyArg_ParseTuple(args,"s",&refer_to))
> return NULL;
>
> if(self->p_dlg->refer(refer_to)){
> ERROR("refer failed\n");
> return NULL;
> }
>
> Py_INCREF(Py_None);
> return Py_None;
>
> }
>
> and thats it: recompile sems and the Ivr module and you should able to
> use the following in your python script:
>
> self.refer('sip:somehwere(at)somwherelese.com <http://somwherelese.com>')
>
> Cheers
> Jason
>
>
> On Mon, Jun 2, 2008 at 12:04 PM, Raphael Coeffic <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> Jason Penton wrote:
>
> I Raphael
>
> yes, the call is setup so I understand that I have to use a
> refer. However, it seems that there is a method for redirect()
> but not one for refer(). I'm using the python IVR api by the way.
>
> Please forget about the redirect() method. It is using a hack
> which only works between 2 SEMS at the end of the route-set (the 2
> servers have to be reachable from the last proxy using
> record-routing).
>
> The best thing to do is to expose the AmSipDialog::refer() method
> to the ivr plug-in. I do not know if you are able to do that, but
> this should be quite easy.
>
> -Raphael.
>
> Kind regards
> Jason
>
>
> On Mon, Jun 2, 2008 at 10:55 AM, Raphael Coeffic
> <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL
> PROTECTED]
> <mailto:[EMAIL PROTECTED]>>> wrote:
>
> Jason Penton wrote:
>
> Hi Raphael
>
> yes, the call is setup from a phone thru SER to SEMS. I
> now,
> from SEMS, want to be able to reroute the call to a third
> party with SEMS being removed from the session?????
>
> Ok, i think i understood that. Now the question is: is the call
> already setup (INVITE, 200 OK, ACK) at the time you want to
> redirect it?
> If you want to redirect BEFORE any final reply (>199) has been
> sent by SEMS, then you can reply the INVITE request with "302
> Moved temporarily". If you want to redirect AFTER the final
> reply
> and ACK, you will have to send a REFER request to the caller.
>
> Maybe you could disclose you scenario to us, so that we can
> give
> you a better answer.
>
> Cheers
> Raphael.
>
> Kind regards
> Jason
>
>
> On Sat, May 31, 2008 at 11:23 PM, Raphael Coeffic
> <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>> wrote:
>
> Hi Jason,
>
> I may not understand your issue, but what about
> using a simple
> re-direct answer? If the call is already setup, the only
> solution
> is REFER.
>
> Cheers,
> Raphael.
>
>
> On 30.05.2008, at 12:17, "Jason Penton"
> <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>
> <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>>>
>
> wrote:
>
> Hi all,
>
> Is there functionality in SEMS to redirect a
> call without
> staying in the callpath. It seems that
> ConnectCallee keeps
> SEMS in the call path???????
>
> Kind regards
> Jason
> _______________________________________________
> Semsdev mailing list
> [email protected]
> <mailto:[email protected]>
> <mailto:[email protected]
> <mailto:[email protected]>>
> <mailto:[email protected]
> <mailto:[email protected]>
> <mailto:[email protected]
> <mailto:[email protected]>>>
>
>
> http://lists.iptel.org/mailman/listinfo/semsdev
>
>
>
>
>
>
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev