6 Sep
2016
6 Sep
'16
2:44 p.m.
Hi,
If the string is fairly constant in format, i.e. it's always 'SIP/<numbers>@SIPProvider', then I'd try:
if (&request:Asterisk-Last-Data =~ /\/([0-9]+)\@/) { # a series of digits preceded by a / and followed by an @ update reply { Called-Station-Id := "%{1}" } }
+1 = there are similar examples in the provided policy files of recent versions (eg for breaking up usernames... on recent versions you could also look at the explode xlat module alan