Re: [OpenSIPS-Users] Intercepting a 302 response and dispatching an INVITE to a new destination set

2017-09-07 Thread Blagovest Buyukliev
The onreply_route is never armed, but gets executed.

The failure_route[initial_request] is armed via t_on_failure("initial_request") 
and actually gets executed after the onreply_route (as per my last test).

Can we stop the propagation of the 302 from within failure_route, or is it 
considered already sent after the execution of onreply_route?

> On Sep 7, 2017, at 8:12 PM, Alex Balashov  wrote:
> 
> Don't arm the onreply_route. Doesn't the failure_route get called?
> 
> On September 7, 2017 1:08:55 PM EDT, Blagovest Buyukliev 
>  wrote:
>> Which functions need to be used for that?
>> 
>> The current routing logic is roughly what's listed below and the
>> problematic issues are commented.
>> 
>> How can it be modified to accomplish what you've described?
>> 
>> route {
>>   ...
>>   loose_route();
>>   record_route();
>>   t_on_failure("initial_request");
>>   t_relay();
>> 
>>   # We are okay here, the initial INVITE is passed to a local server.
>> }
>> 
>> onreply_route {
>>   if ($rs == 302) {
>> # The 302 is caught here, but we are pretty much handicapped to do
>> anything in this block.
>> # The response is passed back to the external network, which is
>> undesired.
>>   }
>> }
>> 
>> failure_route[initial_request] {
>> # How can we arrive here right upon the receipt of the 302, not in
>> onreply_route?
>> }
>> 
>>> On Sep 5, 2017, at 4:54 PM, Alex Balashov 
>> wrote:
>>> 
>>> Yes, failure_route is the answer to all your objectives here. You can
>>> intercept the 302, extract what you want from it, create a new branch
>>> and fork the call elsewhere.
>>> 
>>> -- 
>>> Alex Balashov | Principal | Evariste Systems LLC
>>> 
>>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
>>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>> 
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> -- Alex
> 
> --
> Sent via mobile, please forgive typos and brevity. 
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Intercepting a 302 response and dispatching an INVITE to a new destination set

2017-09-07 Thread Alex Balashov
Don't arm the onreply_route. Doesn't the failure_route get called?

On September 7, 2017 1:08:55 PM EDT, Blagovest Buyukliev 
 wrote:
>Which functions need to be used for that?
>
>The current routing logic is roughly what's listed below and the
>problematic issues are commented.
>
>How can it be modified to accomplish what you've described?
>
>route {
>...
>loose_route();
>record_route();
>t_on_failure("initial_request");
>t_relay();
>
># We are okay here, the initial INVITE is passed to a local server.
>}
>
>onreply_route {
>if ($rs == 302) {
># The 302 is caught here, but we are pretty much handicapped to do
>anything in this block.
># The response is passed back to the external network, which is
>undesired.
>}
>}
>
>failure_route[initial_request] {
># How can we arrive here right upon the receipt of the 302, not in
>onreply_route?
>}
>
>> On Sep 5, 2017, at 4:54 PM, Alex Balashov 
>wrote:
>> 
>> Yes, failure_route is the answer to all your objectives here. You can
>> intercept the 302, extract what you want from it, create a new branch
>> and fork the call elsewhere.
>> 
>> -- 
>> Alex Balashov | Principal | Evariste Systems LLC
>> 
>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>> 
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-- Alex

--
Sent via mobile, please forgive typos and brevity. 

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Intercepting a 302 response and dispatching an INVITE to a new destination set

2017-09-07 Thread Blagovest Buyukliev
Which functions need to be used for that?

The current routing logic is roughly what's listed below and the problematic 
issues are commented.

How can it be modified to accomplish what you've described?

route {
...
loose_route();
record_route();
t_on_failure("initial_request");
t_relay();

# We are okay here, the initial INVITE is passed to a local server.
}

onreply_route {
if ($rs == 302) {
# The 302 is caught here, but we are pretty much handicapped to do 
anything in this block.
# The response is passed back to the external network, which is 
undesired.
}
}

failure_route[initial_request] {
# How can we arrive here right upon the receipt of the 302, not in 
onreply_route?
}

> On Sep 5, 2017, at 4:54 PM, Alex Balashov  wrote:
> 
> Yes, failure_route is the answer to all your objectives here. You can
> intercept the 302, extract what you want from it, create a new branch
> and fork the call elsewhere.
> 
> -- 
> Alex Balashov | Principal | Evariste Systems LLC
> 
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ACK bug help needed

2017-09-07 Thread Brian Southworth
Hi Razvan,

 
I just checked my cfg.

 
It contains this: 

 
if (has_totag()) {

    if (topology_hiding_match()) {

    xlog("Succesfully matched this request to a topology hiding dialog. 
\n");

    xlog("Calller side callid is $ci \n");

    xlog("Callee side callid  is $TH_callee_callid \n");

    t_relay();

    exit;


    } else {

    if ( is_method("ACK") ) {

    if ( t_check_trans() ) {

    t_relay();

    exit;

    } else

    exit;

    }

    sl_send_reply("404","Not here");

    exit;


    }

    }

 
Regards,

 
Brian Southworth

Communications Developer


111 Wilmslow Road

Handforth

Wilmslow

SK9 3ER

 
T: 0 446677

W: www.clocom.uk  

 
 

 

 

 

  

Like us on Facebook



Follow us on Twitter



 
 

 

 

 

Clocom is a green company. Think, do you need to print this email?

 
This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system. E-mail transmission cannot be guaranteed to be 
secure or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents of this 
message, which arise as a result of e-mail transmission. If verification is 
required please request a hard-copy version. Clocom UK Ltd, 111 Wilmslow Road, 
Handforth, Cheshire, SK9 3ER www.clocom.uk  

 
 
From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Razvan 
Crainea
Sent: 05 September 2017 10:57
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] ACK bug help needed

 
Hi, Brian!

OpenSIPS doesn't need to send an ACK back, it has to relay the 200 OK to the 
caller, and the caller will send the ACK back. Can you confirm you are doing 
record_route() on the initial INVITE?
Also, can you post somewhere a SIP trace/pcap?

Best regards,



Răzvan Crainea


OpenSIPS Developer


www.opensips-solutions.com  

On 09/05/2017 12:44 PM, Brian Southworth wrote:

Hi All,

 
I seem to be having issues with outbound calls, the calls go out and the 
connection is established.

But when the asterisk gateway send the 200OK back from the provider to opensips 
proxy, the proxy doesn’t send the ACK packet back to asterisk it just keeps 
looping it to itself.

 
Any help would be appreciated. 

 
Regards,

 
Brian Southworth

Communications Developer


111 Wilmslow Road

Handforth

Wilmslow

SK9 3ER

 
T: 0 446677

W: www.clocom.uk  

 
 

 

 

 

  

Like us on Facebook



Follow us on Twitter



 
 

 

 

 

Clocom is a green company. Think, do you need to print this email?

 
This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system. E-mail transmission cannot be guaranteed to be 
secure or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents of this 
message, which arise as a result of e-mail transmission. If verification is 
required please request a hard-copy version. Clocom UK Ltd, 111 Wilmslow Road, 
Handforth, Cheshire, SK9 3ER www.clocom.uk  

 
 





___


Users mailing list


Users@lists.opensips.org  


http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
 

 

___



Users mailing list



Users@lists.opensips.org  



http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
 


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] ACK bug help needed

2017-09-07 Thread Brian Southworth
Hi Razvan,

 
I Have sent you the pcap file link to your personal email.

Asterisk cuts the calls because it is missing a critical packet ACK from what I 
can see replying to the 200ok it sent to opensips.

But opensips only sends the ACK packet to itself and nowhere else, the call has 
audio and is active for 33 seconds until the call is cut. Due to a no reply to 
critical packet 101.

 
The system works by using opensips as a proxy open sips then sets the dst uri 
and the call is then t_relay() on to asterisk gateway.

Yeah I can confirm I am doing Record_route();

 
Regards,

 
Brian Southworth

Communications Developer


111 Wilmslow Road

Handforth

Wilmslow

SK9 3ER

 
T: 0 446677

W: www.clocom.uk  

 
 

 

 

 

  

Like us on Facebook



Follow us on Twitter



 
 

 

 

 

Clocom is a green company. Think, do you need to print this email?

 
This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system. E-mail transmission cannot be guaranteed to be 
secure or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents of this 
message, which arise as a result of e-mail transmission. If verification is 
required please request a hard-copy version. Clocom UK Ltd, 111 Wilmslow Road, 
Handforth, Cheshire, SK9 3ER www.clocom.uk  

 
 
From: Users [mailto:users-boun...@lists.opensips.org] On Behalf Of Razvan 
Crainea
Sent: 05 September 2017 10:57
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] ACK bug help needed

 
Hi, Brian!

OpenSIPS doesn't need to send an ACK back, it has to relay the 200 OK to the 
caller, and the caller will send the ACK back. Can you confirm you are doing 
record_route() on the initial INVITE?
Also, can you post somewhere a SIP trace/pcap?

Best regards,



Răzvan Crainea


OpenSIPS Developer


www.opensips-solutions.com  

On 09/05/2017 12:44 PM, Brian Southworth wrote:

Hi All,

 
I seem to be having issues with outbound calls, the calls go out and the 
connection is established.

But when the asterisk gateway send the 200OK back from the provider to opensips 
proxy, the proxy doesn’t send the ACK packet back to asterisk it just keeps 
looping it to itself.

 
Any help would be appreciated. 

 
Regards,

 
Brian Southworth

Communications Developer


111 Wilmslow Road

Handforth

Wilmslow

SK9 3ER

 
T: 0 446677

W: www.clocom.uk  

 
 

 

 

 

  

Like us on Facebook



Follow us on Twitter



 
 

 

 

 

Clocom is a green company. Think, do you need to print this email?

 
This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system. E-mail transmission cannot be guaranteed to be 
secure or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents of this 
message, which arise as a result of e-mail transmission. If verification is 
required please request a hard-copy version. Clocom UK Ltd, 111 Wilmslow Road, 
Handforth, Cheshire, SK9 3ER www.clocom.uk  

 
 





___


Users mailing list


Users@lists.opensips.org  


http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
 

 

___



Users mailing list



Users@lists.opensips.org  



http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
 


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users