You can check on domain or IP which you can find in the following pseudo variables
$rd: RURI domain $fd: FROM domain $td: TO domain $ad: AUTH domain $si: source IP @ of message example : if ($si == "1.2.3.4") { sdp_remove_codec ( ... ); } You can find the complete list of pseudo variables here. Use what you want to suit your needs. http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables Reda On Tue, May 15, 2012 at 4:02 PM, Grégoire Vandendeurpel < g.vandendeur...@gmail.com> wrote: > Hello, I should test the dev version , yeah, but I have an other question > before that, about sdpops: > > Is it possible to remove codecs ( yeah working well on 3.2 ) but > specifically from an domain or IP .. ? > > And how? > > Thanks in advance > > Best regards > > 2012/5/15 Reda Aouad <reda.ao...@gmail.com> > >> Can't help anymore on this. >> >> But if you're short on time and need a dirty solution, try the following >> functions from textops module: >> replace_body_all OR subst_body >> >> Match the line "m=type..." using a grep expression and replace it with >> and empty string. >> >> I do that to remove lines from SDP body. I ran into some problems to do >> it neatly, so if you have some text messed up while doing it, try to >> include \r\n characters in your grep expression. >> >> And finally, why don't you install the dev version? >> >> Reda >> >> >> >> On Tue, May 15, 2012 at 2:22 PM, Grégoire Vandendeurpel < >> g.vandendeur...@gmail.com> wrote: >> >>> Hello, I already compiled sdpops in 3.2. I tried an other command like >>> sdp_remove_codecs_by_id and this one is working well on the 3.2 version of >>> kamailio! >>> >>> I think, the problem is specifically from the remove media command. >>> >>> Any suggestion? >>> >>> Best regards >>> >>> 2012/5/15 Reda Aouad <reda.ao...@gmail.com> >>> >>>> Hi, >>>> >>>> You can MAY BE copy take the sdpops module from dev version and compile >>>> it with 3.2. Not sure it would work though. >>>> However, it should be easy to install the entire dev version, just as >>>> you did with 3.2.3. >>>> >>>> Reda >>>> >>>> >>>> >>>> On Tue, May 15, 2012 at 1:15 PM, Grégoire Vandendeurpel < >>>> g.vandendeur...@gmail.com> wrote: >>>> >>>>> Hello, >>>>> >>>>> Thanks for your answer, is there an other way to use it with the 3.2.3 >>>>> version of Kamailio? Cause I'm doing my final project of my bachloor, and >>>>> I >>>>> really need to use it for. >>>>> >>>>> Is it possible to change something in the code or.. to make it working >>>>> well with my version? >>>>> >>>>> Best regards >>>>> >>>>> >>>>> 2012/5/15 Reda Aouad <reda.ao...@gmail.com> >>>>> >>>>>> Hi, >>>>>> >>>>>> This function is available in Kamailio 3.3 (currently in dev stage) >>>>>> and not 3.2. >>>>>> >>>>>> Reda >>>>>> >>>>>> >>>>>> >>>>>> On Tue, May 15, 2012 at 11:49 AM, Grégoire Vandendeurpel < >>>>>> g.vandendeur...@gmail.com> wrote: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> I use Kamailio 3.2.3 and I used the command from the sdpops module " >>>>>>> sdp_remove_media("video");" >>>>>>> >>>>>>> But when i restarted kamailio, this error appeared: >>>>>>> >>>>>>> 0(2623) ERROR: <core> [cfg.y:3393]: cfg. parser: failed to find >>>>>>> command sdp_remove_media >>>>>>> 0(2623) : <core> [cfg.y:3532]: parse error in config file >>>>>>> /etc/kamailio/kamailio.cfg, line 721, column 27: unknown command, >>>>>>> missing >>>>>>> loadmodule? >>>>>>> >>>>>>> Do You know why ? >>>>>>> >>>>>>> Cause I loeded the sdpops module. >>>>>>> >>>>>>> Thanks in advance for your help >>>>>>> -- >>>>>>> *Grégoire Vandendeurpel, * >>>>>>> * >>>>>>> * >>>>>>> *IT Sector* >>>>>>> >>>>>>> _______________________________________________ >>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing >>>>>>> list >>>>>>> sr-users@lists.sip-router.org >>>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing >>>>>> list >>>>>> sr-users@lists.sip-router.org >>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> *Grégoire Vandendeurpel, * >>>>> * >>>>> * >>>>> *IT Sector* >>>>> >>>>> _______________________________________________ >>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >>>>> sr-users@lists.sip-router.org >>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >>>> sr-users@lists.sip-router.org >>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>>> >>>> >>> >>> >>> -- >>> *Grégoire Vandendeurpel, * >>> * >>> * >>> *IT Sector* >>> >>> _______________________________________________ >>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >>> sr-users@lists.sip-router.org >>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >>> >>> >> >> _______________________________________________ >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list >> sr-users@lists.sip-router.org >> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >> >> > > > -- > *Grégoire Vandendeurpel, * > * > * > *IT Sector* > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users > >
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users