Hello list,
I am afraid I am asking something stupid but I cannot find a way to do this cleanly, so
here it goes....
I am retrieving values from a db using either carrierroute or mtree modules to send a 302
to my softswitch. It expects the message as:
SIP/2.0 302 Moved Temporarily
Via: SIP/2.0/UDP 134.111.48.66:5060;branch=zgfdgdfgf2491b5437
Contact: <sip:989897@X.X.X.X;rg=4003>;q=0.2
Contact: <sip:989897@X.X.X.X:rg=321>;q=0.8
To: <sip:989897@X.X.X.X:5066>;tag=1
.....
Where the important things are the rg: those are the trunks in the SS) and the q
(probability) and there can be multiple rgs for the same prefix (2 in this example)
My idea was to keep in the db something like this:
Prefix:98
Route:4003,0.2|321,0.8
And then inject those values in the contact header, but I am having a hard time finding
the right way to do it. Is there any way to do it without calling the perl module?
Many thanks,
A