[OpenSIPS-Users] rewriting transactional responses

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Mar 18 10:46:45 CET 2009


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