Zum Inhalt wechseln


Foto

Snom XML Dialplan Rewrite Rule Broken?


  • Please log in to reply
3 replies to this topic

#1 WelshPaul

WelshPaul

    Advanced Member

  • Members
  • PIPPIPPIP
  • 37 Beiträge:
  • Gender:Male

Geschrieben 15 February 2014 - 04:42 PM

Afternoon all...
 
I have created a simple XML dialplan for use with a Snom 870 running firmware version snom870-SIP 8.7.3.25.5 however it seems if I add a rule such as:
 
<template match="123" timeout="3" user="phone" rewrite="321"/>
 
This works just fine, however if I add a rule:
 
<template match="[2-8]....." timeout="3" user="phone" rewrite="01792......" />
 
This does not work? It seems to just add the last digit dialled after the 01792 part? e.g. If I dial 234567 the rewrite is written as 01792777777
 
Can anyone confirm if this is a bug or if I am doing something wrong please?
 
Below is my full XML file:
 

<?xml version="1.0" encoding="utf-8"?>
<dialplan e="2">
  <TEMPLATE MATCH="101" Timeout="0" User="phone" />
  <!-- Police -->
  <TEMPLATE MATCH="111" Timeout="0" User="phone" />
  <!-- NHS -->
  <TEMPLATE MATCH="112" Timeout="0" User="phone" />
  <!-- Emergency Services -->
  <TEMPLATE MATCH="123" Timeout="0" User="phone" />
  <!-- Date & Time -->
  <TEMPLATE MATCH="150" Timeout="0" User="phone" />
  <!-- Customer Services -->
  <TEMPLATE MATCH="152" Timeout="0" User="phone" />
  <!-- Echo Test -->
  <TEMPLATE MATCH="154" Timeout="0" User="phone" />
  <!-- Account Balance -->
  <TEMPLATE MATCH="155" Timeout="0" User="phone" />
  <!-- Test Call -->
  <TEMPLATE MATCH="156" Timeout="0" User="phone" />
  <!-- Conference Service -->
  <TEMPLATE MATCH="166" Timeout="0" User="phone" />
  <!-- Anti-Sales Tool -->
  <TEMPLATE MATCH="2.." Timeout="3" User="phone" />
  <!-- Voipfone Extensions -->
  <TEMPLATE MATCH="999" Timeout="0" User="phone" />
  <!-- Emergency Services -->
  <TEMPLATE MATCH="1471" Timeout="0" User="phone" />
  <!-- 1471 Call Return -->
  <TEMPLATE MATCH="1571" Timeout="0" User="phone" />
  <!-- Voicemail -->
  <TEMPLATE MATCH="1572" Timeout="0" User="phone" />
  <!-- Group Voicemail -->
  <TEMPLATE MATCH="118..." Timeout="0" User="phone" />
  <!-- 118 Directory Enquiries -->
  <TEMPLATE MATCH="3......." Timeout="3" User="phone" />
  <!-- Voipfone -->
  <TEMPLATE MATCH="3.......*..." Timeout="0" User="phone" />
  <!-- Voipfone Extensions -->
  <TEMPLATE MATCH="[2-8]....." Timeout="3" User="phone" Rewrite="01792......" />
  <!-- Local Calls -->
  <TEMPLATE MATCH="0[1-9]........." Timeout="0" User="phone" />
  <!-- National Numbers -->
  <TEMPLATE MATCH="00*" Timeout="3" User="phone" />
  <!-- International Calls -->
  <TEMPLATE MATCH="*" Timeout="10"/>
  <!-- Anything Else -->
</dialplan>

For everything VoIP
www.ukvoipforums.com

#2 WelshPaul

WelshPaul

    Advanced Member

  • Members
  • PIPPIPPIP
  • 37 Beiträge:
  • Gender:Male

Geschrieben 18 February 2014 - 12:23 PM

Wow no replies, nobody use XML dialplans but me? :s I done a search but the results date back a couple of years...

I can't use the XML dialplan as well as enter a Dial-Plan String because if I enter anything in the Dial-Plan String box under Identity ---> sip the XML dialplan does not work at all.

So it's one or the other, my problem is I need to use the timeout string and that only works in XML. :(
For everything VoIP
www.ukvoipforums.com

#3 Guest_Matthias_*

Guest_Matthias_*
  • Guests

Geschrieben 19 February 2014 - 02:44 PM

Hi WelshPaul,

 

much to our regret the rewrite tag doesn't work correctly.

But it would be possible to use the regular expression for handle the rewrite line. After input the 6 digits the phone dials immediately.

 

<template match="[2-8]....." timeout="3" scheme="sip" user="phone" rewrite="01792......" />

 

webinterface/identity/sip/dialplan:

|^([2-8])([0-9]{5})$|sip:01792\1\2@\d

 

Regards



#4 WelshPaul

WelshPaul

    Advanced Member

  • Members
  • PIPPIPPIP
  • 37 Beiträge:
  • Gender:Male

Geschrieben 19 February 2014 - 05:13 PM

Thanks for getting back to me, I am aware of:

webinterface/identity/sip/dialplan:
|^([2-8])([0-9]{5})$|sip:01792\1\2@\d

However if I enter anything into webinterface/identity/sip/dialplan it breaks the XML dialplan completely...

Example:

I upload the following XML dialplan:

<?xml version="1.0" encoding="utf-8"?>
<dialplan e="2">
<TEMPLATE MATCH="101" Timeout="0" User="phone" />
<!-- Police -->
<TEMPLATE MATCH="111" Timeout="0" User="phone" />
<!-- NHS -->
<TEMPLATE MATCH="112" Timeout="0" User="phone" />
<!-- Emergency Services -->
<TEMPLATE MATCH="123" Timeout="0" User="phone" />
<!-- Date & Time -->
<TEMPLATE MATCH="150" Timeout="0" User="phone" />
<!-- Customer Services -->
<TEMPLATE MATCH="152" Timeout="0" User="phone" />
<!-- Echo Test -->
<TEMPLATE MATCH="154" Timeout="0" User="phone" />
<!-- Account Balance -->
<TEMPLATE MATCH="155" Timeout="0" User="phone" />
<!-- Test Call -->
<TEMPLATE MATCH="156" Timeout="0" User="phone" />
<!-- Conference Service -->
<TEMPLATE MATCH="166" Timeout="0" User="phone" />
<!-- Anti-Sales Tool -->
<TEMPLATE MATCH="2.." Timeout="3" User="phone" />
<!-- Voipfone Extensions -->
<TEMPLATE MATCH="999" Timeout="0" User="phone" />
<!-- Emergency Services -->
<TEMPLATE MATCH="1471" Timeout="0" User="phone" />
<!-- 1471 Call Return -->
<TEMPLATE MATCH="1571" Timeout="0" User="phone" />
<!-- Voicemail -->
<TEMPLATE MATCH="1572" Timeout="0" User="phone" />
<!-- Group Voicemail -->
<TEMPLATE MATCH="118..." Timeout="0" User="phone" />
<!-- 118 Directory Enquiries -->
<TEMPLATE MATCH="3......." Timeout="3" User="phone" />
<!-- Voipfone -->
<TEMPLATE MATCH="3.......*..." Timeout="0" User="phone" />
<!-- Voipfone Extensions -->
<TEMPLATE MATCH="0[1-9]........." Timeout="0" User="phone" />
<!-- National Numbers -->
<TEMPLATE MATCH="00*" Timeout="3" User="phone" />
<!-- International Calls -->
<TEMPLATE MATCH="*" Timeout="10"/>
<!-- Anything Else -->
</dialplan>

Then I add |^([2-8])([0-9]{5})$|sip:01792\1\2@\d into the webinterface/identity/sip/dialplan field now local numbers work just fine but all the numbers in my XML dialplan no longer work at all. Delete the dialplan from webinterface/identity/sip/dialplan and the XML dialplan now works again.

The only reason why I am using an XML dialplan is because some numbers need a timeout to allow time to enter longer numbers that start with the same digits as shorter ones.

I am surprised that this is still broken four years on. :(
For everything VoIP
www.ukvoipforums.com




0 Besucher lesen dieses Thema

Mitglieder: 0 | Gäste: 0 | Anonyme Mitglieder: 0