[Kamailio-Users] forking on URIs from DB

Robert McGilvray rmcgilvr at globeop.com
Thu Jul 2 02:04:20 CEST 2009


I'm trying to setup custom aliases out of a sql db that will sometimes
need to fork and need some help realizing how I can assign q values and
process them correctly. I'm using kam 1.5.

 

Let's assume I query for our main support line and return 3 URIs from
the db along with a separate column for the q. 

 

Sip:us-support at mycomp.com q=1.0

Sip:uk-support at mycomp.com q=1.0

Sip:in-support at mycomp.com q=0.90

 

Based on the values I'd want to parallel fork on the first two to send
this to my UK and US support line, if that fails cancel the first two
branches and route to India. Just to see if I was on the right track I
tried adding them as branches using $br, which from what I understand is
the only way to add branches from avps/variables. I added them by
appending ;q=1.0 on the end of the URI like you would see in a Contact
header but I don't think that's valid.  Calls to $(branch(q) return
<null> so it obviously doesn't take. 

 

If I were to just fork sequentially I could just load them into avps and
call it in a failure route, but how do I handle a combination of the
two? Am I wrong in trying to specify the q along with the URI?

 

I noticed serialize_branches was removed in 1.4, which is what I use in
production today in 1.3 - do I need to use the replacements in TM to
order them and add the branches? 

 

Thanks in advance.

 

 

 


--------------------------------------------------------------------------
This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20090701/cf36b6b3/attachment.htm>


More information about the Users mailing list