[OpenSIPS-Users] Nested reply_routes

spce at lard.at spce at lard.at
Thu Apr 9 09:13:04 UTC 2026


Hi,:

thanks. In my case theres a quite big onreply route, which totally 
works, but is a hassle to read. Therefore I would like to segment some 
stuff into custom "functions", so I can have an easy to understand main 
onreply route and the more complicated logic in special blocks.

A possibility for that would be to call secondary onreply routes from 
the parent route. Is that possible or not?

Liebe Grüße / Kind regards,
Malte

On 08/04/2026 17.23, Richard Robson wrote:
> you call a reply route to handle the relpy. i.e. a positive outcome 
> 200OK or a 183 etc. This reply should be relayed back to the 
> originator and there should be no need to call another reply route. it 
> won't expect a reply just an ack and that should be handled as an ACK 
> and relayed or an error sent back. (see the default script)
> if you want the reply route to do something else then add a route to 
> do that or a branch route if needed. and call that from the reply 
> route (not nested)
>
> Richard
>
>
> On Wed, 2026-04-08 at 15:38 +0200, spce at lard.at wrote:
>> Hi,
>>
>> is it possible to use nested reply routes in opensips?
>>
>> I want to clean up my script and thinking of something like this:
>>
>> > onreply_route[MAIN] {
>> >  [...]
>> >  is_from_gw(1) = t_on_reply("ADD_ISUP");> }
>> >  [...] }
>> >  onreply_route[ADD_ISUP] {
>> >  add_isup_part() }
>>
>> The nested onreply route then should return to the parent onreply 
>> route. In my tests I specifically had issues with the rtpengine 
>> module: when using rtpengine_answer in the parent onreply route and 
>> then calling another onreply route from parent route, opensips wasn't 
>> able to see the SDP body in the reply and the rtpengine_answer thus 
>> failed.
>>
>>
>> -- 
>> Liebe Grüße / Kind regards,
>> Malte
>>
>> _______________________________________________
>> 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/20260409/038b415a/attachment-0001.html>


More information about the Users mailing list