Hello,
On 3/29/12 11:17 AM, Hervé Cochet wrote:
Hello,
I used kamailio to handle SIP line from a provider using uacreg
table.
Everything was working fine till they add a proxy which do not set
(or
not propagate) route header in ACK or BYE request.
So my routing logic is broken in the "in-dialog" transaction mode,
since the loose_route return FALSE.
If I try to force a t_relay after the loose_route, my message may
not
be routing properly if for example my UAC was not connected with
the
standard 5060 port or use a different protocol like TCP (It works
if
both are in UDP and use 5060 port).
Is there a way to retrieve the record-route previously sets for
this
session in order to route this message properly ?
is the Record-Route set mirrored in the 200ok?
If the device is not supporting record-routing, then ACK/BYE should
not get to your proxy. Can you post a full sip trace for such a call
(from invite to bye)? It will help to understand how the message
flow is and maybe we can help more.
As a generic hint for storing/retrieving data, look at htable
module, or if you prefer to use database storage, sqlops may be an
alternative. You can keep the values based on callid.
Another problem is that the dialog module do not match the BYE
transaction, the "did" variable is missing since the route is not
there
but it should match the request with SIP matching (dlg_match_mode
is
set to 1).
For example my dialog parameters are:
dialog:: hash=1214:1340198900
state:: 3
timestart:: 1333006717
timeout:: 80537132
callid:: 16260-CI-30dd2867-797784ae0@my.sip.provider
from_uri:: sip:0367023024@my.sip.provider;user=phone
from_tag:: 16260-GI-30dd2868-17bb342c3
caller_contact:: sip:13.12.14.20:5060
caller_cseq:: 815264875
caller_route_set:: <sip:13.12.14.20:5060;lr>
caller_bind_addr:: udp:130.120.140.131:5060
to_uri:: sip:0974711672@13.12.14.17;user=phone
to_tag:: 1878467993
callee_contact:: sip:0974711672@96.57.249.78:1024
callee_cseq:: 815264875
callee_route_set::
callee_bind_addr:: udp:130.120.140.131:5060
The BYE request:
BYE sip:0974711672@96.57.249.78:1024
SIP/2.0
Call-ID: 16260-CI-30dd2867-797784ae0@my.sip.provider
CSeq: 815264876 BYE
From: "0033482531303"
<sip:0367023024@my.sip.provider;user=phone>;tag=16260-GI-30dd2868-17bb342c3
Max-Forwards: 28
Record-Route: <sip:13.12.14.20:5060;lr>
To: <sip:0974711672@13.12.14.17;user=phone>;tag=1878467993
Via: SIP/2.0/UDP
13.12.14.20:5060;branch=z9hG4bK-LNVP-1196a924-5f1f495a
Reason: q.850;cause=16
User-Agent: Cirpack/v4.42a (gw_sip)
Content-Length: 0
Why does this BYE request is not matched by the dialog modules
using
SIP parameters (Call-ID, uri, tag seems correct) ?
Can you try to execute dlg_manage()? If Route header is missing,
then there is nothing that triggers automatically dialog matching.
Cheers,
Daniel
Hervé
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
http://www.asipto.com/index.php/kamailio-advanced-training/