Hi!
Can I split the variable $fd ?
the $fd has the value: asterisk-wind.voicevw.lan; and i want to take the the first part - asterisk-wind
any hints ?
Have a look at https://www.kamailio.org/wiki/cookbooks/devel/transformations#sselect_index_...
On Wed, Feb 10, 2021 at 8:51 AM Mihai m@mokalife.ro wrote:
Hi!
Can I split the variable $fd ?
the $fd has the value: asterisk-wind.voicevw.lan; and i want to take the the first part - asterisk-wind
any hints ? _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On 2/10/21 8:50 AM, Mihai wrote:
the $fd has the value: asterisk-wind.voicevw.lan; and i want to take the the first part - asterisk-wind
Sure!
Have a look at Kamailio's equivalent of a .split() method:
https://www.kamailio.org/wiki/cookbooks/5.4.x/transformations#sselect_index_...
In essence: $(fd{s.select,0,.});
-- Alex
Thanks for the link! Was exactly what I was looking for.
On Wed, Feb 10, 2021 at 4:08 PM Alex Balashov abalashov@evaristesys.com wrote:
On 2/10/21 8:50 AM, Mihai wrote:
the $fd has the value: asterisk-wind.voicevw.lan; and i want to take the the first part - asterisk-wind
Sure!
Have a look at Kamailio's equivalent of a .split() method:
https://www.kamailio.org/wiki/cookbooks/5.4.x/transformations#sselect_index_...
In essence: $(fd{s.select,0,.});
-- Alex
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users