[SR-Users] lookup() to fork execution of routing script?

Andrey Utkin andrey.krieger.utkin at gmail.com
Tue Jun 2 19:43:44 CEST 2015


Hi!

Currently we have the following logic in our Kamailio routing script.
On incoming INVITE, we lookup() the location of called party, then we
analyse the updated Request-URI ($ru) regarding callee contact
protocol: is it websocket-based or not, to distinguish web-based
useragents from classic SIP agents and provide RTP profiles
interconnection with rtpengine (RTP/SAVPF for web-based, RTP/AVPF for
the rest). After that, we relay the mangled INVITE to callee
location(s) with t_relay().

The issue arises when callee has both websocket-based and classic
useragents registered simultaneously. According to lookup() manual, it
replaces Req-URI with just one contact, and somehow also attach
metainformation about additional locations, so that t_relay() forks
the call.

lookup() does not provide the possibility to fork the execution of
routing script, so that we could execute our routing logic described
above. But I would love this to be possible, because the only
alternative way for calling to multiple locations seems to be the
serial forking described in TM module manual. But we don't need serial
calling contact-by-contact, waiting for call failures, we need
parallel calling to all available user locations.

So we need an advice how to go. Is there a way to implement what we
need at scripting level, or should this feature be implemented in
Kamailio code (or is it already there?).
Thanks in advance for any help.

-- 
Andrey Utkin



More information about the sr-users mailing list