moonraker46 / xml2AsteriskLookup

Small shell script to lookup a name for a asterisk callerid from a existing external XML phonebook. The XML phonebook can be easy generated also from a cardDAV server (like Baikal, iCloud, Radicale etc.).
0 stars 1 forks source link

xpath set is empty #1

Open DocSledge opened 1 year ago

DocSledge commented 1 year ago

Hi, I just tried your script on my asterisk pbxand did the following: Copied original FritzBox Phonebook as "phonebook.xml" to /var/lib/asterisk. Copied cid_lookup.sh to /var/lib/asterisk. By testing as you mentioned: "./cid_lookup telephonenumber" there is an error that says: "xpath set is empty ". Do you have a solution?

Hi, auf meiner AsteriskPBX auf einm Pi4 läuft ein Asterisk Testsystem. Asterisk läuft als root (wird geändert). Beide geforderten Dateien liegen in /var/lib/asterisk. Beim Aufruf mit sudo "./cid_lookup Telefonnummer" kommt obiger Fehler. Hast Du evtl eine Lösung? Liebe Grüße aus dem Norden, Gerd

moonraker46 commented 1 year ago

You have to check if your phonebook has the same structure than the one I use in the example:

`

e882fccf-f804-4061-9261-4931330b5688017434454550584847434Test Tester ` If not you have to adapt your xpath to your XML structure.
DocSledge commented 1 year ago

There is an error in your script. It only allows 10 digits. If the phone number is like 05234678902 it doesnt recognize it. Das Script wertet nur max 10 Zahlen aus. Ist die Telefonnummer größer 10 gibt es besagten Fehler.

Am 21. August 2023 22:44:56 MESZ schrieb moonraker46 @.***>:

You have to check if your phonebook has the sam structure than the one I use in the example:

`

e882fccf-f804-4061-9261-4931330b5688017434454550584847434Test Tester ` If not you have to adapt your xpath to your XML structure. -- Reply to this email directly or view it on GitHub: https://github.com/moonraker46/xml2AsteriskLookup/issues/1#issuecomment-1687018497 You are receiving this because you authored the thread. Message ID: ***@***.***>