Hi Matthew, Could you post a SIP trace (from your opensips) of a such call - to see exactly what is wrong and what can be done ?
Regards, Bogdan Matthew Lehner wrote: > Bogdan, > > Thanks, that makes sense now. The problem seems to be at my provider > though. They rewrite the RURI to be my opensips and not the > destination. Seems the provider is ignoring my lr=on and making it a > strict route. I am still figuring out the difference between > loose/strict. Would the best solution to this be to ignore any Route > headers from my provider in this case? > > Matt > > On Thu, Jun 10, 2010 at 4:20 PM, Bogdan-Andrei Iancu > <[email protected]> wrote: > >> Hi Matthew, >> >> you have a logical bug in your routing - all sequential requests are >> routed in SIP based only on Route hdrs (via loose_route), so there is no >> need to do manual routing for them. Manual routing is done only for >> initial requests. >> >> Better see http://www.opensips.org/Resources/Webinars#toc11 >> >> When the sequential request comes from the provider, it will have a >> Route hdr pointing to your opensips and in RURI will be the IP of the >> final Asterisk box (contact from 200 OK) -> after loose_route, opensips >> will remove the Route hdr with its IP and the request will be routed >> (RURI based) to proper Asterisk. >> >> Regards, >> Bogdan >> >> Matthew Lehner wrote: >> >>> I am setting up opensips to act as a proxy between a SIP trunk >>> provider and more than one asterisk server. I am using alias_db to >>> determine which asterisk server a particular DID/user should be >>> relayed to. I am also using record_route() to ensure my proxy stays in >>> the entire dialog of the call. >>> >>> The initial requests go through just fine, but subsequent requests in >>> the same dialog from the SIP provider are not getting routed properly >>> because of loose_route(). >>> >>> When the request from the SIP provider arrives, it hits loose_route() >>> and the RURI gets changed to sip:222.222.222.227;lr=on which does not >>> contain a username and so alias_db can no longer match the call >>> details and route the request to the proper asterisk server. >>> >>> The way I understood loose_route() was supposed to work is.. it checks >>> the top-most Route header to see if it is the local proxy.. if it is >>> it removes that Route and if there is another Route below it.. it will >>> change the RURI to that. >>> >>> If I just don't do loose_route() on requests from the SIP provider, >>> everything works as expected.. but this does not seem like the right >>> solution to the problem. >>> >>> I have included debug output from opensips, along with some of my own >>> logging. >>> >>> 333.333.333.x is the SIP provider >>> 222.222.222.x is my opensips proxy >>> >>> Regards, >>> >>> Matt >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Users mailing list >>> [email protected] >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >> -- >> Bogdan-Andrei Iancu >> www.voice-system.ro >> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > -- Bogdan-Andrei Iancu www.voice-system.ro _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
