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@gmail.com phone: +34669448337