Hello, I haven't read thoroughly the entire thread to know what was tried and still fails, but for adding a new branch with more than just r-uri, look at sbranch_append() from pv module.
Cheers, Daniel On 09.09.25 10:27, Benoit Panizzon via sr-users wrote: > Hi > > I got it almost working but I am hitting the next issue: > > After t_load_contacts() I have branches from registered locations. > Those contain a destination uri from the path header. > > append_branch(); > $(branch(dst_uri)[-1]) = "sip:host.example:5060"; > $(branch(uri)[-1]) = "sip:[email protected]"; > t_on_branch("BR_TO_PBX"); > route(RELAY); > > branch_route[BR_TO_PBX] > { > xlog("L_INFO", "$cfg(route): DEBUG: RUID: $ruid RURI: $ru Next Hop: > $nh(u)\n"); > > if ($ruid == $null) { > append_hf("Diversion: <$fu>;reason=simuring\r\n"); > } > } > > In my case, I load one contact from registered locations and add > [email protected] as another contact which shall ring simultaneously > (the external mobile phone associated to the user). > > After append_branch() and setting the branch uri and dst_uri of the > appended branch, the call is correctly routed to the [email protected] > but branch 0 loaded with t_load_contacts has lost it's destination URI, > $nh(u) is empty so it is not sent via the SBC through which the > registration happened and which is documented via path header. > > Any idea why this happens and how I can preserve the nexthop? > > Mit freundlichen Grüssen > > -Benoît Panizzon- > -- > I m p r o W a r e A G - Leiter Commerce Kunden > ______________________________________________________ > > Zurlindenstrasse 29 Tel +41 61 826 93 00 > CH-4133 Pratteln Fax +41 61 826 93 01 > Schweiz Web http://www.imp.ch > ______________________________________________________ > __________________________________________________________ > Kamailio - Users Mailing List - Non Commercial Discussions -- > [email protected] > To unsubscribe send an email to [email protected] > Important: keep the mailing list in the recipients, do not reply only to the > sender! -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com
__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
