[SR-Users] CANCEL request and subsequent 487 response to INVTE configuration problem

Joao Alves Jalves at amdocs.com
Tue Jun 16 14:33:35 CEST 2015


Got it. Thanks for the explanation!.
Regards,
Joao

From: Daniel-Constantin Mierla [mailto:miconda at gmail.com]
Sent: terça-feira, 16 de Junho de 2015 12:08
To: Joao Alves; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] CANCEL request and subsequent 487 response to INVTE configuration problem

Hello,

the functions from tm and tmx module work at transaction level -- if the transaction was not created before (or the function doesn't create the transaction), then they don't do much. The log messages you gave indicated that the transaction was not found.

In understood that you terminate the invite locally, not forward it via sip anymore, so you need to create the transaction with the dedicated function. Otherwise, t_relay() creates the transaction if not created (for convenience).

Cheers,
Daniel
On 15/06/15 20:23, Joao Alves wrote:
Hi Daniel,

As suggested, I've add the t_newtran() after the SIP INVITE and did work. Now the responses are being send correctly (which is great!), and in fact no need did notice that the 487 response is sent automatically, and thus no need to explicitly generate one.

Curious to understand why is that. I gathered that t_newtran() - assuming this is the proper function - was used to create a new transaction, let's say if needed to generate a new SIP INVITE req from the server (UAS) side. Why in that sense would I need to create a "new" transaction?

Many Thanks,
Joao


From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla
Sent: segunda-feira, 15 de Junho de 2015 18:45
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] CANCEL request and subsequent 487 response to INVTE configuration problem

Hello,

have you created the transaction for INVITE request?

There is also a function t_cancel_callid() that could help better than t_reply_callid().

Cheers,
Daniel
On 15/06/15 19:29, Joao Alves wrote:
Hi,

I'm creating a configuration is for a SIP <> HTTP gateway (performing protocol conversion) and thus all SIP messages and responses needs to be generated from the kamailio config file.

I'm failing to create the case where the calling user abandons the session, and thus, following the reception of a CANCEL a 200 "OK" needs to be sent to this transaction and later the 487 "Request Terminated" to the SIP INVITE original session.

On the traces I see:
SIP INVITE (Cseq 1 INVITE) -->
100 Trying (Cseq 1 INVITE) <--
180 Ringing (Cseq 1 INVITE) <--
SIP CANCEL (Cseq 1 CANCEL) -->
200 Ok (CSeq 1 CANCEL) <--
487 Request Terminated (CSeq 1 CANCEL)

Have then tried several options, trying to force the CSeq 1 INVITE but without success.
t_reply_callid("$ci", "$cs", "487", " Request Terminated ");
t_reply_callid("$ci", "$rm", "487", "Request Terminated");
t_reply_callid("$ci", "1", "487", "Request Terminated");

For instance, for the last I get the following log.
 6(60226) exec: *** cfgtrace:request_route=[REQINIT] c=[/etc/kamailio/kamailio.cfg] l=705 a=28 n=t_reply_callid
 6(60226) DEBUG: tm [t_lookup.c:1715]: t_lookup_callid(): created comparable call_id header field: >Call-ID: 76589ZTJmNTAwZDhlOTZiM2I3MjhhYzllNjgyOWVjZGZmMzk
<
 6(60226) DEBUG: tm [t_lookup.c:1719]: t_lookup_callid(): created comparable cseq header field: >CSeq: 1 INVITE<
 6(60226) DEBUG: tm [t_lookup.c:1722]: t_lookup_callid(): just locked hash index 18668, looking for transactions there:
 6(60226) DEBUG: tm [t_lookup.c:1749]: t_lookup_callid(): DEBUG: t_lookup_callid: transaction not found.
 6(60226) DEBUG: tmx [tmx_mod.c:500]: t_reply_callid(): Lookup failed - no transaction

Could you assist here?

Thanks,
Joao



Joao Alves
Solution Architect, Unified Communications

+351 214094660 (desk)
+351 912783702 (mobile)

AMDOCS |EMBRACE CHALLENGEEXPERIENCE SUCCESS

This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp




_______________________________________________

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>

http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




--

Daniel-Constantin Mierla

http://twitter.com/#!/miconda<http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda

Book: SIP Routing With Kamailio - http://www.asipto.com



--

Daniel-Constantin Mierla

http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

Book: SIP Routing With Kamailio - http://www.asipto.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150616/4ee21531/attachment.html>


More information about the sr-users mailing list