[OpenSIPS-Users] PRACK, 404 not here

Miha miha at softnet.si
Thu Sep 15 09:31:40 CEST 2016


Hi Razvan

i was on trip... so sorry for my late response.

I tried with match_dialog() but then I got loop.

59.878504 SBC_2 -> SBC_1 SIP 524 Request: PRACK 
sip:381114220000 at SBC_1:5060;transport=udp |
  59.878742 SBC_1 -> SBC_1 SIP 530 Request: PRACK 
sip:SBC_1;lr;ftag=1875648965;did=b4a.460f9d7 |
  59.878959 SBC_1 -> SBC_1 SIP 596 Request: PRACK 
sip:SBC_1;lr;ftag=1875648965;did=b4a.460f9d7 |
  59.879128 SBC_1 -> SBC_1 SIP 662 Request: PRACK 
sip:SBC_1;lr;ftag=1875648965;did=b4a.460f9d7 |
  59.879299 SBC_1 -> SBC_1 SIP 728 Request: PRACK 
sip:SBC_1;lr;ftag=1875648965;did=b4a.460f9d7 |
  59.879892 SBC_1 -> SBC_1 SIP 794 Request: PRACK 
sip:SBC_1;lr;ftag=1875648965;did=b4a.460f9d7 |
  59.880214 SBC_1 -> SBC_1 SIP 860 Request: PRACK 
sip:SBC_1;lr;ftag=1875648965;did=b4a.460f9d7 |
  59.880417 SBC_1 -> SBC_1 SIP 926 Request: PRACK 
sip:SBC_1;lr;ftag=1875648965;did=b4a.460f9d7 |
  59.880945 SBC_1 -> SBC_1 SIP 992 Request: PRACK 
sip:SBC_1;lr;ftag=1875648965;did=b4a.460f9d7 |

Yes in my script I have:  listen=udp:SBC_1:5060

Do you have any other recommendation what I should try?


tnx
miha
On 07/09/2016 10:12, Răzvan Crainea wrote:
> Hi, Miha!
>
> It looks like loose_route() fails - did you try to look into the logs 
> and see if it indicates something? Is the SBC_1 IP advertised in the 
> Route header a listener of OpenSIPS?
>
> Also, if loose_route() fails, you should still try to match the PRACK 
> against the dialog. So your scripting logic should look like this:
>
> if (has_totag()) {
>     if (loose_route() || match_dialog()) {
>         ...
>     }
> }
>
> Let us know how that goes.
>
> Best regards,
> Răzvan Crainea
> OpenSIPS Solutions
> www.opensips-solutions.com
> On 09/07/2016 10:38 AM, Miha wrote:
>> Hi
>>
>> i have one issue and do not know how to solve it...
>>
>> Initial invite:
>>
>> U SBC_2:5060 -> SBC_1:5060 INVITE 
>> sip:777774220000 at SBC_1:5060;user=phone SIP/2.0. Via: SIP/2.0/UDP 
>> SBC_2:5060;branch=z9hG4bK57fa.67ccbb16.0. From: 
>> <sip:8888818100100 at PBX;user=phone>;tag=*1875283502*. To: 
>> <sip:777774220000 at SBC_2;user=phone>. Call-ID: 
>> *fb9e258ae909d311a85a0090332e03ed at PBX.* CSeq: 1193456 INVITE. 
>> Contact: <sip:SBC_2;did=8d9.43418513>. Alert-Info: 
>> <urn:alert:source:internal>. Allow: 
>> REGISTER,SUBSCRIBE,NOTIFY,INVITE,ACK,P
>> Seq....U PBX:5060 -> SBC_2:5060 PRACK sip:SBC_2;did=8d9.43418513 SIP/2.0. 
>> Via: SIP/2.0/UDP PBX:5060;branch=z9hG4bK-002AF6E3;rport. From: 
>> <sip:8888818100100 at PBX;user=phone>;tag=*1875283502*. To: 
>> <sip:777774220000 at SBC_2;user=phone>;tag=*FamBBcayZeKgF*. 
>> Call-ID:*fb9e258ae909d311a85a0090332e03ed at PBX.* CSeq: 1193457 PRACK. 
>> Content-Length: 0. Max-Forwards: 70. RAck: 1601153264 1193456 INVITE. 
>> . Seq.... U SBC_2:5060 -> SBC_1:5060 PRACK 
>> sip:777774220000 at SBC_1:5060;transport=udp SIP/2.0. Route: 
>> <sip:SBC_1;lr;ftag=1875283502;did=8d9.e2509d35>. Via: SIP/2.0/UDP 
>> SBC_2:5060;branch=z9hG4bK67fa.e6a41de2.0. From: 
>> <sip:8888818100100 at PBX;user=phone>;tag=*1875283502*. To: 
>> <sip:777774220000 at SBC_2;user=phone>;tag=*FamBBcayZeKgF*. Call-ID: 
>> *fb9e258ae909d311a85a0090332e03ed at PBX.* CSeq: 1193457 PRACK. 
>> Content-Length: 0. Max-Forwards: 69. RAck: 1601153264 1193456 INVITE.
>>
>> Seq....
>> U SBC_1:5060 -> SBC_2:5060 SIP/2.0 404 Not here. Via: SIP/2.0/UDP 
>> SBC_2:5060;branch=z9hG4bK67fa.e6a41de2.0. From: 
>> <sip:8888818100100 at PBX;user=phone>;tag=1875283502. To: 
>> <sip:777774220000 at SBC_2;user=phone>;tag=FamBBcayZeKgF. Call-ID: 
>> fb9e258ae909d311a85a0090332e03ed at PBX. CSeq: 1193457 PRACK. Server: 
>> OpenSIPS (2.1.1 (x86_64/linux)). Content-Length: 0.
>>
>> Why I am getting 404 from Opensips. is should be routed like seq request, right?
>>
>>
>>
>>
>>
>> if (has_totag()) { # sequential requests within a dialog should # 
>> take the path determined by record-routing if (loose_route()) { 
>> xlog("loose_route"); #if ($DLG_status!=NULL) xlog("dlg_status"); if 
>> (!validate_dialog()){ fix_route_dialog(); xlog("fix_route_dialog"); } 
>> if (is_method("BYE")) { setflag(1); # do accounting ... 
>> #setflag(ACC_FAILED); # ... even if the transaction fails } else if 
>> (is_method("INVITE")) { # even if in most of the cases is useless, do 
>> RR for # re-INVITEs alos, as some buggy clients do change route set # 
>> during the dialog. record_route(); xlog("check_fraud"); } # route it 
>> out to whatever destination was set by loose_route() # in $du 
>> (destination URI). route(relay); } else { if ( is_method("ACK") ) { 
>> if ( t_check_trans() ) { # non loose-route, but stateful ACK; must be 
>> an ACK after # a 487 or e.g. 404 from upstream server t_relay(); 
>> exit; } else { # ACK without matching transaction -> # ignore and 
>> discard exit; } } sl_send_reply("404","Not here"); } exit; tnx miha    
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160915/69cd24a8/attachment-0001.htm>


More information about the Users mailing list