Re: [SR-Users] {param.count,delimiter} issue

2019-08-20 Thread Henning Westerholt
Documentation seems also missing at https://www.kamailio.org/wiki/cookbooks/devel/transformations Cheers, Henning Am 20.08.19 um 11:22 schrieb Daniel-Constantin Mierla: > I just pushed the commit adding the {s.count,c} parameter: > >   * > https://github.com/kamailio/kamailio/commit/18eb1c973c

Re: [SR-Users] {param.count,delimiter} issue

2019-08-20 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I just pushed the commit adding the {s.count,c} parameter: Thanks, Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Re: [SR-Users] {param.count,delimiter} issue

2019-08-20 Thread Daniel-Constantin Mierla
I just pushed the commit adding the {s.count,c} parameter:   * https://github.com/kamailio/kamailio/commit/18eb1c973c5d863a562864c2b77b4e1d520f9406 Can you try it and see if works fine? I didn't have any time for testing yet ... Cheers, Daniel On 19.08.19 14:44, Daniel-Constantin Mierla wrote:

Re: [SR-Users] {param.count,delimiter} issue

2019-08-19 Thread Daniel-Constantin Mierla
On 19.08.19 14:41, Juha Heinanen wrote: > Daniel-Constantin Mierla writes: > >>> One alternative could be to implement >>> >>> {s.count, delimiter} >>> >>> which would tell how many items a list separated by delimiter has. >> That can be added, probably it would be just a generic {s.count,char} =>

Re: [SR-Users] {param.count,delimiter} issue

2019-08-19 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > > One alternative could be to implement > > > > {s.count, delimiter} > > > > which would tell how many items a list separated by delimiter has. > > That can be added, probably it would be just a generic {s.count,char} => > return the number of appearances of cha

Re: [SR-Users] {param.count,delimiter} issue

2019-08-19 Thread Daniel-Constantin Mierla
On 19.08.19 14:30, Juha Heinanen wrote: > One alternative could be to implement > > {s.count, delimiter} > > which would tell how many items a list separated by delimiter has. That can be added, probably it would be just a generic {s.count,char} => return the number of appearances of char in the

[SR-Users] {param.count,delimiter} issue

2019-08-19 Thread Juha Heinanen
One alternative could be to implement {s.count, delimiter} which would tell how many items a list separated by delimiter has. -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listin

Re: [SR-Users] {param.count,delimiter} issue

2019-08-19 Thread Daniel-Constantin Mierla
On 19.08.19 12:21, Juha Heinanen wrote: > Daniel-Constantin Mierla writes: > >> iirc, the comma does not work as delimiter between parameters, because >> it is the delimiter between the header bodies (when many bodies are >> serialized within same header name). > I thought that comma can be used a

Re: [SR-Users] {param.count,delimiter} issue

2019-08-19 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > iirc, the comma does not work as delimiter between parameters, because > it is the delimiter between the header bodies (when many bodies are > serialized within same header name). I thought that comma can be used as param.count delimiter, because it works as sel

Re: [SR-Users] {param.count,delimiter} issue

2019-08-19 Thread Daniel-Constantin Mierla
Hello, iirc, the comma does not work as delimiter between parameters, because it is the delimiter between the header bodies (when many bodies are serialized within same header name). If someone wants that, then should be extended, but careful not to break SIP header parsing. An alternative is to

[SR-Users] {param.count,delimiter} issue

2019-08-19 Thread Juha Heinanen
Looks like there is bug in {param.count,delimiter} transformation: $var(test) = "a=1;b=2"; xinfo("param count = $(var(test){param.count,;})\n"); $var(test) = "a=1,b=2"; xinfo("param count = $(var(test){param.count,,})\n"); syslog: Aug 19 11:27:27 salmon /usr/bin/sip-proxy[26513]: