OK thanks, I will write something about that ;) I tested your solution, it works for BYE but not force CANCEL. Indeed, for BYE from my SBC enters in loose_route statement, but not for a CANCEL.
is there a simplest way to choose the good rtpengine ? I want use a group of rtpengine (like id:1) for Europe and other group (like id:2) for USA. ++ Le mar. 20 nov. 2018 à 13:45, Răzvan Crainea <[email protected]> a écrit : > No, it only survives until the end of transaction :). > I agree it would be nice to have it persistent throughout the dialog, > but that's not in there yet. But you can always open a feature request > for this :): > > https://github.com/OpenSIPS/opensips/issues > > Best regards, > Răzvan > > On 11/20/18 12:15 PM, Mickael Hubert wrote: > > Hi Răzvan, > > thanks a lot for your answer ! > > > > Ok I will try this workaround > > But I don't understand the rtpengine module documentation > > (http://www.opensips.org/html/docs/modules/2.4.x/rtpengine.html) > > > > If I have -> modparam("rtpengine", "setid_avp", "$avp(setid)") and I set > > setid_avp to 1 (for my example) just once, before rtpengine_manage, this > > variable should survives until the end no ? > > > > > > ++ > > > > > > > > Le mar. 20 nov. 2018 à 09:43, Răzvan Crainea <[email protected] > > <mailto:[email protected]>> a écrit : > > > > Hi, Mickael! > > > > AVPs are only available during transaction - initial request and its > > replies, but it is not avaialble to sequential requests (such as > CANCEL > > or BYE). If you want to store a value throughout the entire dialog, > you > > should save the variable in a dialog variable[1], something like > this: > > > > # initial INVITE > > $avp(setid) = 1; > > create_dialog(); > > $dlg_val(setid) = $avp(setid); > > > > # CANCEL or BYE, *after* loose_route() is called > > # so that the dialog is matched/found > > loose_route(); > > $avp(setid) = $dlg_val(setid); > > > > Hope this helps. > > > > [1] https://opensips.org/html/docs/modules/2.4.x/dialog#pv_dlg_val > > > > Best regards, > > Răzvan > > > > On 11/19/18 6:01 PM, Mickael Hubert wrote: > > > Hi all, > > > I have a rtpengine with opensips, when I use rtpengine without > > setid_avp > > > all works like a charm > > > > > > modparam("rtpengine", "rtpengine_sock", "udp:10.13.0.129:12221 > > <http://10.13.0.129:12221> > > > <http://10.13.0.129:12221>") > > > > > > _When I want use setid_avp:_ > > > > > > modparam("rtpengine", "setid_avp", "$avp(setid)") > > > modparam("rtpengine", "rtpengine_sock", "1 == > > udp:10.13.0.129:12221 <http://10.13.0.129:12221> > > > <http://10.13.0.129:12221>") > > > > > > _I call manage function in initial INVITE:_ > > > > > > $avp(setid) = 1; > > > create_dialog(); > > > xlog("L_INFO","setid: $avp(setid)\n"); > > > if(rtpengine_manage("ICE=remove")) > > > { > > > xlog("L_INFO","SDP Offer: $ci for INVITE\n"); > > > } > > > > > > for an reply $avp(setid) is populate, and rtpengine works. > > > > > > _but for BYE and CANCEL I have an issue:_ > > > _ > > > _ > > > you can see the setid variable isn't populate for this CANCEL, > > but it is > > > populate for 487 reply ! > > > I have this error log: ERROR:rtpengine:select_rtpe_node: script > > error > > > -no valid set selected / ERROR:rtpengine:rtpe_function_call: no > > > available proxies > > > > > > When I force the setid to 1 for BYE and CANCEL, there isn't issue. > > > > > > However, the module documentation explains : > > > /IMPORTANT: if you use multiple sets, take care and use the same > > set for > > > both rtpengine_offer()/rtpengine_answer() and rtpengine_delete()!! > > > / > > > /If the set was selected using setid_avp, the avp needs to be set > > only > > > once before rtpengine_offer() or rtpengine_manage() call. / > > > > > > Can you help me please ? > > > > > > thanks in advance > > > > > > PS: same issue with BYE method > > > __ > > > > > > __ > > > > > > Nov 19 16:53:41 am-scr1-test /usr/local/sbin/opensips[22531]: > > > > > > > ################################################################################ > > > Nov 19 16:53:41 am-scr1-test /usr/local/sbin/opensips[22531]: > > CANCEL END > > > OF CALL : call-id 1def6e7f-66b6-1237-7b9d-0050569229dc > > > Nov 19 16:53:41 am-scr1-test /usr/local/sbin/opensips[22531]: > > > > > > > ################################################################################ > > > Nov 19 16:53:41 am-scr1-test /usr/local/sbin/opensips[22531]: > > setid: <null> > > > Nov 19 16:53:41 am-scr1-test /usr/local/sbin/opensips[22531]: > > > *ERROR:rtpengine:select_rtpe_node: script error -no valid set > > selected* > > > Nov 19 16:53:41 am-scr1-test /usr/local/sbin/opensips[22531]: > > > *ERROR:rtpengine:rtpe_function_call: no available proxies* > > > Nov 19 16:53:41 am-scr1-test /usr/local/sbin/opensips[22521]: > > > 1def6e7f-66b6-1237-7b9d-0050569229dc In ONREPLY ROUTE 2 - fu : > > > sip:+******@am-isbc1-******** , ru : <null> , si : 10.13.0.80, > > status : 487 > > > Nov 19 16:53:41 am-scr1-test /usr/local/sbin/opensips[22521]: > > setid: 1 > > > > > > if (is_method("CANCEL")) > > > { > > > > > > > > > > xlog("L_INFO","################################################################################ > > > > > \n"); > > > xlog("L_INFO","CANCEL END OF CALL : call-id $ci \n"); > > > > > > > > > > xlog("L_INFO","################################################################################ > > > > > \n"); > > > xlog("L_INFO","setid: $avp(setid)\n"); > > > if(rtpengine_manage("ICE=remove")) > > > { > > > xlog("L_INFO","SDP Offer: $ci for CANCEL\n"); > > > } > > > ............. > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Users mailing list > > > [email protected] <mailto:[email protected]> > > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > > -- > > Răzvan Crainea > > OpenSIPS Core Developer > > http://www.opensips-solutions.com > > > > _______________________________________________ > > Users mailing list > > [email protected] <mailto:[email protected]> > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > > > _______________________________________________ > > Users mailing list > > [email protected] > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > -- > Răzvan Crainea > OpenSIPS Core Developer > http://www.opensips-solutions.com > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
