[OpenSIPS-Users] rewriting transactional responses

Jeff Pyle jpyle at fidelityvoice.com
Wed Mar 18 13:29:09 CET 2009


Hi Bogdan,

After some experimentation that's what I've discovered.  Much of the time
Opensips contines to resend whatever t_reply() sends even after receiving
the ACK from Asterisk (UAC).  I upgraded Asterisk to 1.4.23.1 (almost
current) and those retransmissions seem to have stopped.

Apparently it wasn't Opensips at all.  Imagine that.


Thanks,
Jeff



On 3/18/09 5:46 AM, "Bogdan-Andrei Iancu" <bogdan at voice-system.ro> wrote:

> Hi Jeff,
> 
> you can do t_reply() from request route (when processing first time the
> received request) if you want to reply the request and not to forward
> it, and from failure route if you want to overwrite the replies received
> from the UASs.
> 
> route{
>     t_on_failure("1");
>     t_relay();
> }
> 
> failure_route[1] {
>     if (t_check_status("3[0-9][0-9]")
>        t_reply("500","Server dailure");
> }
> 
> 
> Regards,
> Bogdan
> 
> Jeff Pyle wrote:
>> Hi Bogdan,
>> 
>> Will this work if the t_reply() is in the request route?  In this case I
>> don't know yet in the failure_route if I have another PSTN carrier to try
>> until I check in a request route.
>> 
>> I tried it in the request route, and it indeed sent the specified response,
>> and the UAC (Asterisk) ACK'd it, but Opensips continued to send the new
>> message several more times as if it hadn't received the ACK or it didn't
>> match the proper transaction.
>> 
>> 
>> 
>> - Jeff
>> 
>> 
>> 
>> On 3/17/09 9:51 AM, "Bogdan-Andrei Iancu" <bogdan at voice-system.ro> wrote:
>> 
>>   
>>> Hi Jeff,
>>> 
>>> simply do t_reply() from failure route and you will override the
>>> received reply.
>>> 
>>> Regards,
>>> Bogdan
>>> 
>>> Jeff Pyle wrote:
>>>     
>>>> Hello,
>>>> 
>>>> If a transaction has progressed from the initial request route, hit a
>>>> t_relay(), come back into an armed failure route with a 302, and gone back
>>>> to another request route... how can I change the 302 to something more
>>>> generic (such as a 500) before relaying it to the UAC?
>>>> 
>>>> 
>>>> Thanks,
>>>> Jeff
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>> 
>>>>   
>>>>       
>> 
>> 
>>   
> 




More information about the Users mailing list