[OpenSIPS-Users] Module Path and function loose_route

mayamatakeshi mayamatakeshi at gmail.com
Thu Aug 20 19:41:44 CEST 2009


Hello,
I'm testing with the path module.
I'm using this scheme:
User1 - REGISTER -> opensips -> REGISTER -> registrar.
Then, when a call comes into the registrar to User1 I'm trying to send
the INVITE to User1 via opensips.

In my cfg I have added a test to see if an out-of-dialog request
contains a valid route set:

        #if there is a "pre-loaded route set", then it is a request to
be sent to a user
        if(loose_route()) {
             ...relay the request
        }

However, loose_route() is returning false.
This is in accordance to
http://www.opensips.org/html/docs/modules/1.5.x/rr.html where we can
read:

"There is only one exception: If the request is out-of-dialog (no
to-tag) and there is only one Route: header indicating the local
proxy, then the Route: header is removed and the function returns
FALSE."

But why does it return FALSE?

I'm trying with the following INVITE:

INVITE sip:eywhywhdyhdywehd at 192.168.4.6 SIP/2.0
Via: SIP/2.0/UDP
192.168.2.121:5070;rport;branch=z9hG4bKPjJ5ldIJPcArMnJ0soPgyRWi3zGyA9TYBt
Max-Forwards: 70
From: <sip:pbx at ldilsjeodlskekdksl.com>;tag=QumeNtxM4Cb9Qj77vumy5ujr8vHoJBfS
To: <sip:eywhywhdyhdywehd at ldilsjeodlskekdksl.com>
Contact: <sip:tester at 192.168.2.121:5070>
Call-ID: Vw3Cvf6utvMuzj-K2WGOc.YYvYWfORGB
CSeq: 28223 INVITE
Route: <sip:192.168.2.100:5060;lr>
Allow: SUBSCRIBE, NOTIFY, REFER, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK
Supported: replaces, 100rel
Content-Type: application/sdp
Content-Length:   453
[SDP ommited]

So, how should the INVITE be sent for loose_route to succeed?
Or should I put something else in my cfg?

regards,
takeshi



More information about the Users mailing list