[SR-Users] Weird dialplan result

David Villasmil david.villasmil.work at gmail.com
Wed Apr 15 21:59:05 CEST 2020


Hello guys,

So i have the following dialplan (almost literally, 2 records)

+----+------+-----+----------+-----------+-----------+-----------+----------+---------------------------------------+
| id | dpid | pr  | match_op | match_exp | match_len | subst_exp | repl_exp
| attrs                                 |
+----+------+-----+----------+-----------+-----------+-----------+----------+---------------------------------------+
| 10 |    1 | 100 |        0 | 910000000 |         0 |           |
 | 1.2.3.4:5060                          |
| 11 |    1 | 100 |        0 | 910000001 |         0 |           |
 | sip.somedomain.net:5060               |

And with kamcmd:

kamcmd> dialplan.translate 1 s:910000000
{
Output:
Attributes: 1.2.3.4:5060
}

and

kamcmd> dialplan.translate 1 s:910600000
error: 500 - No translation

So that works... now, when i get an INVITE I do:

dp_match("1", "$rU");
xlog("[DIALPLAN] '$rU' was translated to '$var(destination)'\n");

if ( $var(destination)!=0 ) {
  $ru = "sip:" + $fU + "@" + $var(destination);
  route(RELAY);
}

And this prints:

<script>: [DIALPLAN] '910600000' was translated to '195.114.216.188:5060'

What am I doing wrong? Kind of confused here...


Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200415/13cdab5f/attachment.html>


More information about the sr-users mailing list