Freeswitch XML Curl

390 views
Skip to first unread message

CD

unread,
Jul 22, 2014, 7:49:46 PM7/22/14
to as...@googlegroups.com
Hi,

I've installed ASTPP with Freeswitch and Kamailio.

At present users are authenticated with Kamailio via the database.

Calls are then passed to freeswitch by Kamailio.

When I dial an internal extension I can see the "live call" in the ASTPP admin. This is promising.

I've tried for about 6 hours but can't get calls to reach ASTPP. Then I realised mod_curl was not compiled.

I now have it compiled, but get the following error:

2014-07-23 00:31:56.491172 [ERR] switch_xml.c:1710 Error[[error near line 38]: root tag missing]

I'm only doing curl for the directory file, but I'm having trouble debugging. I have debug turned on in the settings but cannot see anything in
/var/log/syslog
/var/log/astpp
/var/og/apache2
/var/log/httpd

All the log files are quiet.

Any advice on how I can get my calls to hit ASTPP ?

Thanks

CD

Juned Khan

unread,
Jul 23, 2014, 1:17:02 AM7/23/14
to as...@googlegroups.com
You must have mod_xml_curl module installed to get calls working.
I recommend you to refer manual installation steps which can be found here
and just try to reinstall FS. Also make sure to enable mod_xml_cdr and mod_xml_curl module before
starting the installation process.


--
You received this message because you are subscribed to the Google Groups "ASTPP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astpp+un...@googlegroups.com.
To post to this group, send email to as...@googlegroups.com.
Visit this group at http://groups.google.com/group/astpp.
To view this discussion on the web visit https://groups.google.com/d/msgid/astpp/eb64921f-bcfa-417b-92dd-82fc285f811f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Juned Khan

Chirag Desai

unread,
Jul 23, 2014, 3:36:42 AM7/23/14
to as...@googlegroups.com

Hi Juned,

Thanks for your reply.

The installation guide you posted is the one I followed.

I believe both mods for curl and CDR are working.

When I attempt to make a call I get this error:

2014-07-23 00:31:56.491172 [ERR] switch_xml.c:1710 Error[[error near line 38]: root tag missing]

At first the error complained about unclosed tag <in...@astpp.org>. Once I removed the < and > of the dial plan perl file I started to see this error:

2014-07-23 00:31:56.491172 [ERR] switch_xml.c:1710 Error[[error near line 38]: root tag missing]

Any ideas how to resolve?

Thanks.

Juned Khan

unread,
Jul 23, 2014, 3:43:01 AM7/23/14
to as...@googlegroups.com
Chirag, by modifying XML files you must have accidentally deleted something
in that. so its complaining about that. I recommend you to double check
the files which you have modified lastly.


--
You received this message because you are subscribed to the Google Groups "ASTPP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astpp+un...@googlegroups.com.
To post to this group, send email to as...@googlegroups.com.
Visit this group at http://groups.google.com/group/astpp.

For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Juned Khan

Chirag Desai

unread,
Jul 26, 2014, 9:34:01 AM7/26/14
to as...@googlegroups.com
Hi,

I have the xml_curl working, but the dialplan seems to be blank.

This is the output in my /tmp folder.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="result">
<result status="not found" /></section>
</document>

Right now I have calls from Kamailio directing to the public external dialplan of FreeSwitch. Depending on a prefix set by Kamailio, these calls are routed to the internal dialplan (stored as a file on the FreeSwitch server).

What do I need to change to get the calls to go to a dialplan which hits ASTPP logic to determine whether the user has enough credit and then make the call?

Thanks,

CD

CD

unread,
Jul 26, 2014, 11:48:46 AM7/26/14
to as...@googlegroups.com
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] DID SQL : select
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      accounts.id,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      accounts.number as account_code,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      dids.number as did_number,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      connectcost,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      includedseconds,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      monthlycost,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      cost,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      inc,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      extensions,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      provider_id,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      setup,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      limittime,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      disconnectionfee,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      variables,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      options,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      dids.maxchannels,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      dial_as,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      dids.call_type
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t  from
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      dids,
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      accounts
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t  where
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t      accounts.id=dids.accountid
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t  AND accounts.status=1
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \t\t\t  AND dids.number = '9198'
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] Account code :: 1173095825, Pricelist Id  :: 1, Max channels :: 1, Inuse :: -12, Account : default, Called number :: 9198
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] Use of uninitialized value $arg{"debug"} in concatenation (.) or string at /usr/local/share/perl/5.14.2/ASTPP.pm line 473.
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187]
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] FINDING LIMIT FOR: 1173095825
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] SQL : SELECT * FROM pricelists WHERE id = '1'
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] SQL : SELECT * FROM routes WHERE '9198' RLIKE pattern AND status = 1 AND pricelist_id = '1' ORDER BY LENGTH(pattern) DESC LIMIT 1
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] pattern: ^9198.*
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] Route: tetris Cost: 0.02000 Pricelist:  Pattern: ^9198.*
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] Found pattern: ^9198.*
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] Account Balance: 5.00000
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] Credit Limit: 5.00000
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] Credit: 0
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] Cost:
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] Pricelist:
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] CALLSTATUS: 0 MAX_LENGTH: 0
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] UPDATE accounts SET inuse = inuse -1 WHERE number = '1173095825'
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] UPDATE accounts SET balance = balance -0.0 WHERE number = '1173095825'
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] COULD NOT FIND ROUTE.  EXITING SO DIALPLAN CAN TAKE OVER
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] Content-Type: text/plain; charset=ISO-8859-1\r
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] \r
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] <?xml version="1.0" encoding="UTF-8" standalone="no"?>
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] <document type="freeswitch/xml">
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] <section name="result">
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] <result status="not found" /></section>
[Sat Jul 26 16:31:12 2014] [error] [client 109.74.200.187] </document>
Reply all
Reply to author
Forward
0 new messages