Hello Jeremy,
o Jeremy A [07/16/08 13:39]:
> Hello Stephan,
>
> Both your code listings have the AmB2BCallerSession::onSessionStart(req)
> called after the python onSessionStart
>
> I'm calling connectCallee in the python onSessionStart. Is this not the
> right place?
>
> Should I call connectCallee in some python function later in the dialog?
> if possible? Or should I find some way to get the
> AmB2BCallerSession::onSessionStart(req) call to occur before the python
> call?
>
> My programmatic objective is to connect an incoming call to a further
> SIP UA at the time of receiving the first connection - onSessionStart
if you would do that in onSessionStart, you already have sent a 200 OK
and set up the session. Then you would invite the callee, and later
reinvite the caller. You probably want to relay the INVITE itself,
without accepting the call, right?
In that case you need to call connectCallee in onInvite (of the session!
not the factory!), and with relayed_invite=true. You need to do some
more things to make that work, have a look at call_timer application
CallTimerDialog::onInvite(const AmSipRequest& req). If you want to use
that in ivr, you will need to add IvrDialog::onInvite and do those
things there. Possibly you also want an onInvite callback, which should
somehow add a way for ivr script to pass the IvrDialog class the
remote_party/_uri, from_party/uri.
hth
Stefan
>
> Stefan Sayer wrote:
>>
>> o Jeremy A [07/16/08 12:23]:
>>> Hello,
>>>
>>> I'm trying to debug my B2B SEMS IVR application where
>>> AmB2BCallerSession.invite_req is missing when executing
>>> AmB2BCallerSession::connectCallee
>>>
>>> It appears that the python IVR OnSessionStart is called instead of
>>> AmB2BCallerSession::onSessionStart(const AmSipRequest& req) - which
>>> is where the session information body is copied to the
>>> AmB2BCallerSession.invite_req. There does not seem to be any obvious way
>> I don't think so:
>>
>> void IvrDialog::onSessionStart(const AmSipRequest& req)
>> {
>> callPyEventHandler("onSessionStart","s",req.hdrs.c_str());
>> setInOut(&playlist,&playlist);
>> AmB2BCallerSession::onSessionStart(req);
>> }
>>
>> AmB2BCallerSession::onSessionStart(req); is called after the python
>> event handler.
>>
>> are you trying to use connectCallee in onSessionStart? (does that work
>> anyway?) In that case, you could try to change it to
>> void IvrDialog::onSessionStart(const AmSipRequest& req)
>> {
>> invite_req = req;
>> callPyEventHandler("onSessionStart","s",req.hdrs.c_str());
>> setInOut(&playlist,&playlist);
>> AmB2BCallerSession::onSessionStart(req);
>> }
>>
>> hth
>> Stefan
>>
>>> for the python script to populate the field.
>>>
>>> I think perhaps that the back-end logic should populate this field
>>> irrespective of the Python IVR code?
>>>
>>> To resolve my immediate problem where is the best place to copy to or
>>> create the AmB2BCallerSession.invite_req string so that connectCallee
>>> has the correct SDP string to use for a second leg?
>>>
>>> Jeremy
>>>
>>> _______________________________________________
>>> Sems mailing list
>>> [email protected]
>>> http://lists.iptel.org/mailman/listinfo/sems
>
> _______________________________________________
> 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