Hello,
Any Idea and solution ?
Laurent
From: Laurent Schweizer
Sent: samedi 12 juillet 2008 21:26
To: '[EMAIL PROTECTED]'
Subject: RE: [Semsdev] problem with Cancel
Hello,
I have added a trace and I see that dlg.getStatus() ==
AmSipDialog::Disconnected when cancel is proceded
if ( dlg.getStatus() != AmSipDialog::Disconnected ) {
DBG("dlg '%s' not terminated: sending
bye\n",dlg.callid.c_str());
if(dlg.bye() == 0){
while ( dlg.getStatus() != AmSipDialog::Disconnected ){
waitForEvent();
processEvents();
}
}
I also see that this status is changed at AmSipDialog.cpp:160 see
log bellow and the problem is that the Invite is send to the called
party just after.
Laurent
(1322) DEBUG: _start (AmThread.cpp:68): (1322) DEBUG: relayEvent
(AmB2BSession.cpp:185): AmB2BSession::relayEvent:
id=3B7DF14E-48790180000514C9-04EE2B90
(1322) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying to
post event
(1322) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
(1322) DEBUG: onSipRequest (AmSession.cpp:636): no audio input and
output set. Session will not be attached to MediaProcessor.
(1322) DEBUG: relayEvent (AmB2BSession.cpp:185):
AmB2BSession::relayEvent: id=3B7DF14E-48790180000514C9-04EE2B90
Thread 84818832 is starting.
(1322) DEBUG: postEvent (AmEventQueue.cpp:48): AmEventQueue: trying to
post event
(1322) DEBUG: postEvent (AmEventQueue.cpp:56): AmEventQueue: event
posted
(1322) DEBUG: processEvents (AmEventQueue.cpp:72): event processed
(1322) DEBUG: processEvents (AmEventQueue.cpp:70): before processing
event
(1322) DEBUG: process (AmSession.cpp:558): AmSession::process
(1322) DEBUG: process (AmSession.cpp:562): Session received SIP Event
(1322) DEBUG: onSipRequest (AmSession.cpp:623): onSipRequest: method =
CANCEL
(1322) DEBUG: updateStatusReply (AmSipDialog.cpp:133): reply:
transaction found!
(1322) DEBUG: send (udp_trsp.cpp:244): send msg
--++--
SIP/2.0 200 OK
Via: SIP/2.0/UDP
212.249.7.196:6000;rport;branch=z9hG4bKPj68170721-73cd-43aa-a67b-1a5acf8
b95f4
From: sip:[EMAIL PROTECTED];tag=b4fbf150-9438-4630-8abe-16a8ae96f1a2
To: sip:[EMAIL PROTECTED];tag=0E19791B-4879017F000C3ED1-04DE1B90
Call-ID: 3d242307-9897-4388-b5a4-746b41b0feab
CSeq: 21948 CANCEL
Content-Length: 0
--++--
(1322) DEBUG: run (AmSession.cpp:404): AmSession:: before wait for event
[EMAIL PROTECTED]
(1322) DEBUG: reset_timer (sip_trans.cpp:149): New timer of type 0xa at
time=2987
(1322) DEBUG: ~sip_msg (sip_parser.cpp:92): ~sip_msg()
(1322) DEBUG: updateStatusReply (AmSipDialog.cpp:133): reply:
transaction found!
(1322) DEBUG: updateStatusReply (AmSipDialog.cpp:160): change status to
Disconected
(1322) DEBUG: updateStatusReply (AmSipDialog.cpp:179): req.method =
INVITE; t.method = INVITE
(1322) DEBUG: send (udp_trsp.cpp:244): send msg
--++--
SIP/2.0 487 Call terminated
Via: SIP/2.0/UDP
212.249.7.196:6000;rport;branch=z9hG4bKPj68170721-73cd-43aa-a67b-1a5acf8
b95f4
From: sip:[EMAIL PROTECTED];tag=b4fbf150-9438-4630-8abe-16a8ae96f1a2
To: sip:[EMAIL PROTECTED];tag=0E19791B-4879017F000C3ED1-04DE1B90
Call-ID: 3d242307-9897-4388-b5a4-746b41b0feab
CSeq: 21948 INVITE
Contact: <sip:[EMAIL PROTECTED]:6000>
Content-Length: 0
--++--
(1322) DEBUG: run (AmSession.cpp:406): AmSession:: after wait for event
[EMAIL PROTECTED]
(1322) DEBUG: processEvents (AmEventQueue.cpp:70): before processing
event
(1322) DEBUG: parse_sip_uri (parse_uri.cpp:314): Converted URI port
(6000) to int (6000)
(1322) DEBUG: reset_timer (sip_trans.cpp:149): (1322) DEBUG:
set_next_hop (trans_layer.cpp:431): New timer of type 0x7 at time=1412
next_hop:next_port is <212.249.7.204:6000>
(1322) DEBUG: reset_timer (sip_trans.cpp:149): (1322) DEBUG:
parse_sip_uri (parse_uri.cpp:314): Converted URI port (6000) to int
(6000)
(1322) DEBUG: send_request (trans_layer.cpp:558): (1322) DEBUG: run
(udp_trsp.cpp:140): Sending to 212.249.7.204:6000 <INVITE
sip:[EMAIL PROTECTED]:6000 SIP/2.0
Via: SIP/2.0/UDP 212.203.123.91:6000;branch=z9hG4bKC1F3NaxY
From: <sip:[EMAIL PROTECTED]>;tag=3B7DF14E-48790180000514C9-04EE2B90
To: <sip:[EMAIL PROTECTED]:6000>
CSeq: 10 INVITE
Call-ID: [EMAIL PROTECTED]
Contact: <sip:[EMAIL PROTECTED]:6000>
Max-Forwards: 70
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY,
PUBLISH, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, norefersub
User-Agent: PJSUA v0.8.0/i686-pc-linux-gnu
Remote-Party-ID:
<sip:[EMAIL PROTECTED]>;party=calling;id-type=subscriber;screen=yes
Content-Type: application/sdp
Content-Length: 438
v=0
o=- 3424878591 3424878591 IN IP4 212.249.7.196
s=pjmedia
c=IN IP4 212.249.7.196
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 0 8 103 102 3 117 104 101
a=rtcp:4001 IN IP4 212.249.7.196
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:103 speex/16000
a=rtpmap:102 speex/8000
a=rtpmap:3 GSM/8000
a=rtpmap:117 iLBC/8000
a=fmtp:117 mode=20
a=rtpmap:104 speex/32000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
>
Laurent
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Laurent Schweizer
Sent: vendredi 11 juillet 2008 18:50
To: [EMAIL PROTECTED]
Subject: Re: [Semsdev] problem with Cancel
Hello all,
Any idea about this problem ?
Thanks
Laurent
From: Laurent Schweizer
Sent: vendredi 11 juillet 2008 07:39
To: '[EMAIL PROTECTED]'
Subject: problem with Cancel
Hello.
Usualy when I stop a call not answered (so with Cancel) all is ok,
Cancel is received by sems, forwarded to the called party and when I
receive back the "487 Canceled" I stop my billing and clear the call.
Now I have a problem if the Cancel arrive to sems during the process of
the Invite. In this case , sems send back the 200 OK for the cancel,
but don't forward them to the other party.
Thanks
Laurent
Log of the problem: http://pastebin.com/m5458105a
In my on cancel I have:
void
MyCCDialog::onCancel ()
{
DBG (" Cancel %i ", m_state );
if (m_state == MyBilling::CC_Connected )
{
DBG ("\n stopAcconting \n ");
terminateOtherLeg ();
stopAccounting ("BYE in onCancel");
m_state = MyBilling::CC_Endcall;
setStopped ();
}
}
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev