Thanks Daniel,

On 03/29/2012 04:40 PM, Daniel-Constantin Mierla wrote:
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?
Yes

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.
Ok, I will send you a complete call flow in private.

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.
It works, thanks. I was not aware that route trigger 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/

--


Hervé COCHET.


Ingénieur en développement logiciel.
Tel Direct:
+33(0)482 531 303

TECHNOSENS SAS
Donnons du sens à la Technologie

31, rue Gustave Eiffel
F-38000 Grenoble
+33(0)476 230 240
www.technosens.fr

--------------------------------------------------------------------------------

Ce message et les documents l'accompagnant sont confidentiels. Ils contiennent des informations qui sont destinées uniquement à la personne ou l'entité dont le nom est indiqué ci-dessus. Toute reproduction, divulgation ou autre utilisation de ces informations, même partiellement, par un autre destinataire est strictement interdite. Si ce message vous est parvenu par erreur, veuillez le détruire immédiatement et nous le faire savoir par téléphone, Fax ou e-mail.