CRITICAL:core:yyerror: parse error in config file

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

CRITICAL:core:yyerror: parse error in config file

M.Abdulaziz
Hello all,

I want to create an opensips registrar/proxy server at the same time.

When I compile the (.cfg) I'm always getting the follwing error:

Nov 28 02:28:16 [2478] CRITICAL:core:yyerror: parse error in config file, line 54, column 1-15: syntax error
Nov 28 02:28:16 [2478] CRITICAL:core:yyerror: parse error in config file, line 54, column 1-15:
Nov 28 02:28:16 [2478] ERROR:core:main: bad config file (2 errors)


I can't locate anything wrong in the file .can any one help me correcting this error
registrar.cfg
Reply | Threaded
Open this post in threaded view
|

Re: CRITICAL:core:yyerror: parse error in config file

symack
You first have to determine which cfg opensips is loading:

/etc/opensips/opensips.cfg, or
/usr/etc/opensips/opensips.cfg

Cheers,

Ninus.



On Sun, Nov 27, 2011 at 6:50 PM, M.Abdulaziz <[hidden email]> wrote:

> Hello all,
>
> I want to create an opensips registrar/proxy server at the same time.
>
> When I compile the (.cfg) I'm always getting the follwing error:
>
> Nov 28 02:28:16 [2478] CRITICAL:core:yyerror: parse error in config file,
> line 54, column 1-15: syntax error
> Nov 28 02:28:16 [2478] CRITICAL:core:yyerror: parse error in config file,
> line 54, column 1-15:
> Nov 28 02:28:16 [2478] ERROR:core:main: bad config file (2 errors)
>
>
> I can't locate anything wrong in the file .can any one help me correcting
> this error
> http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7037342/registrar.cfg
> registrar.cfg
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/CRITICAL-core-yyerror-parse-error-in-config-file-tp7037342p7037342.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

RE: CRITICAL:core:yyerror: parse error in config file

M.Abdulaziz
Thank you Mr. Khamis for replying
 
I did the following:
 
> /etc/init.d/opensips start
 
(OK)
 
then
 
I compiled my cfg:
 
> opensips -c registrar.cfg
 
 
then the error occured after the compile. is there anything wrong in my (registrar.cfg)??
 
 
BTW: I always do it like this to run opensips is it a wrong way to do the run?
 
run:
> opensips -f registrar.cfg
 
udp: listening XXX.XXX.XXX.XXX:port
 
Thanks,
 

From: Nick Khamis [via OpenSIPS (Open SIP Server)] [ml-node+[hidden email]]
Sent: Monday, November 28, 2011 5:14 AM
To: Maysoon Aaziz Alduwais
Subject: Re: CRITICAL:core:yyerror: parse error in config file

You first have to determine which cfg opensips is loading:

/etc/opensips/opensips.cfg, or
/usr/etc/opensips/opensips.cfg

Cheers,

Ninus.



On Sun, Nov 27, 2011 at 6:50 PM, M.Abdulaziz <[hidden email]> wrote:

> Hello all,
>
> I want to create an opensips registrar/proxy server at the same time.
>
> When I compile the (.cfg) I'm always getting the follwing error:
>
> Nov 28 02:28:16 [2478] CRITICAL:core:yyerror: parse error in config file,
> line 54, column 1-15: syntax error
> Nov 28 02:28:16 [2478] CRITICAL:core:yyerror: parse error in config file,
> line 54, column 1-15:
> Nov 28 02:28:16 [2478] ERROR:core:main: bad config file (2 errors)
>
>
> I can't locate anything wrong in the file .can any one help me correcting
> this error
> http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7037342/registrar.cfg
> registrar.cfg
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/CRITICAL-core-yyerror-parse-error-in-config-file-tp7037342p7037342.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



To unsubscribe from CRITICAL:core:yyerror: parse error in config file, click here.
NAML


Disclaimer:
This communication is intended for the above named person and is confidential and / or legally privileged. Any opinion(s) expressed in this communication are not necessarily those of KSU (King Saud University). If it has come to you in error you must take no action based upon it, nor must you print it, copy it, forward it, or show it to anyone. Please delete and destroy the e-mail and any attachments and inform the sender immediately. Thank you.
KSU is not responsible for the political, religious, racial or partisan opinion in any correspondence conducted by its domain users. Therefore, any such opinion expressed, whether explicitly or implicitly, in any said correspondence is not to be interpreted as that of KSU.
KSU may monitor all incoming and outgoing e-mails in line with KSU business practice. Although KSU has taken steps to ensure that e-mails and attachments are free from any virus, we advise that, in keeping with best business practice, the recipient must ensure they are actually virus free.
Reply | Threaded
Open this post in threaded view
|

Re: CRITICAL:core:yyerror: parse error in config file

Bogdan-Andrei Iancu-2
Hi,

Definitely it is something wrong with your cfg - the script parser reports the error at line 54 in file - check it again for syntax error or post it here to examine.

Regards,
Bogdan

On 11/28/2011 05:19 AM, M.Abdulaziz wrote:
Thank you Mr. Khamis for replying
 
I did the following:
 
> /etc/init.d/opensips start
 
(OK)
 
then
 
I compiled my cfg:
 
> opensips -c registrar.cfg
 
 
then the error occured after the compile. is there anything wrong in my (registrar.cfg)??
 
 
BTW: I always do it like this to run opensips is it a wrong way to do the run?
 
run:
> opensips -f registrar.cfg
 
udp: listening XXX.XXX.XXX.XXX:port
 
Thanks,
 

From: Nick Khamis [via OpenSIPS (Open SIP Server)] [ml-node+[hidden email]]
Sent: Monday, November 28, 2011 5:14 AM
To: Maysoon Aaziz Alduwais
Subject: Re: CRITICAL:core:yyerror: parse error in config file

You first have to determine which cfg opensips is loading:

/etc/opensips/opensips.cfg, or
/usr/etc/opensips/opensips.cfg

Cheers,

Ninus.



On Sun, Nov 27, 2011 at 6:50 PM, M.Abdulaziz <[hidden email]> wrote:

> Hello all,
>
> I want to create an opensips registrar/proxy server at the same time.
>
> When I compile the (.cfg) I'm always getting the follwing error:
>
> Nov 28 02:28:16 [2478] CRITICAL:core:yyerror: parse error in config file,
> line 54, column 1-15: syntax error
> Nov 28 02:28:16 [2478] CRITICAL:core:yyerror: parse error in config file,
> line 54, column 1-15:
> Nov 28 02:28:16 [2478] ERROR:core:main: bad config file (2 errors)
>
>
> I can't locate anything wrong in the file .can any one help me correcting
> this error
> http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7037342/registrar.cfg
> registrar.cfg
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/CRITICAL-core-yyerror-parse-error-in-config-file-tp7037342p7037342.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



To unsubscribe from CRITICAL:core:yyerror: parse error in config file, click here.
NAML


Disclaimer:
This communication is intended for the above named person and is confidential and / or legally privileged. Any opinion(s) expressed in this communication are not necessarily those of KSU (King Saud University). If it has come to you in error you must take no action based upon it, nor must you print it, copy it, forward it, or show it to anyone. Please delete and destroy the e-mail and any attachments and inform the sender immediately. Thank you.
KSU is not responsible for the political, religious, racial or partisan opinion in any correspondence conducted by its domain users. Therefore, any such opinion expressed, whether explicitly or implicitly, in any said correspondence is not to be interpreted as that of KSU.
KSU may monitor all incoming and outgoing e-mails in line with KSU business practice. Although KSU has taken steps to ensure that e-mails and attachments are free from any virus, we advise that, in keeping with best business practice, the recipient must ensure they are actually virus free.


View this message in context: RE: CRITICAL:core:yyerror: parse error in config file
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CRITICAL:core:yyerror: parse error in config file

M.Abdulaziz
This post was updated on .
Hello Bogdan,
 
 
I really appreciate your reply
 
here is my .cfg file could you plz help me in finding what is wrong?
 
Thanks in advance,

I notice a weired problem whenever I compile any .cfg file using

>opensips -c (cfg file)

I got the same error in the same line ?? very starnge behave
 
# ----------- global configuration parameters ------------------------
 
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes log_stderror=no # (cmd line: -E)
children=8
# Uncomment these lines to enter debugging mode
#fork=no
#log_stderror=yes
#
listen=udp:192.168.1.69:5061
auto_aliases=no log_name="opensips-1.5.1-log" log_facility=LOG_LOCAL0
 
# ------------------ module loading ---------------------------------- #
 
set module path mpath="/usr/local/lib64/opensips/modules/"
 
# Uncomment this if you want to use SQL database
 
loadmodule "db_mysql.so"
loadmodule "sl.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "tm.so"
 
# ----------------- setting module-specific parameters ---------------
 
# -- usrloc params --
 
modparam("usrloc", "db_url", "mysql://opensips:opensips@localhost/opensips")
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "hash_size", 12)
modparam("usrloc", "fetch_rows", 2500)
modparam("tm", "wt_timer", 2)
 
# ------------------------- request routing logic -------------------
 
# main routing logic //This is line number 54 that the error is referring to
 
route{
 
if(is_method("REGISTER")) {
 
set_time_stamp("before new ul save");
save("location");
diff_time_stamp(1,"after ul save");
exit;
 }
 
set_time_stamp("before new ul lookup");
 
if(lookup("location")) {
 
diff_time_stamp(1,"after ul lookup");
sl_send_reply("200", "ok");
 } else {
 diff_time_stamp(1,"after ul lookup");
 
sl_send_reply("404", "not found");
}
 
t_relay();
 
}
Reply | Threaded
Open this post in threaded view
|

Re: CRITICAL:core:yyerror: parse error in config file

Bogdan-Andrei Iancu-2
Hi,

Where the function set_time_stamp() and diff_time_stamp() are coming
from? what module ....?  I do not know them....

Regards,
Bogdan

On 11/28/2011 03:53 PM, M.Abdulaziz wrote:

> Hello Bodan,
>
>
> I really appreciate your reply
>
> here is my .cfg file could you plz help me in finding what is wrong?
>
> Thanks in advance,
>
> I notice a weired problem whenever I compile any .cfg file using
>
>> opensips -c (cfg file)
> I got the same error in the same line ?? very starnge behave
>
> # ----------- global configuration parameters ------------------------
>
> debug=3 # debug level (cmd line: -dddddddddd)
> fork=yes log_stderror=no # (cmd line: -E)
> children=8
> # Uncomment these lines to enter debugging mode
> #fork=no
> #log_stderror=yes
> #
> listen=udp:192.168.1.69:5061
> auto_aliases=no log_name="opensips-1.5.1-log" log_facility=LOG_LOCAL0
>
> # ------------------ module loading ---------------------------------- #
>
> set module path mpath="/usr/local/lib64/opensips/modules/"
>
> # Uncomment this if you want to use SQL database
>
> loadmodule "db_mysql.so"
> loadmodule "sl.so"
> loadmodule "usrloc.so"
> loadmodule "registrar.so"
> loadmodule "textops.so"
> loadmodule "tm.so"
>
> # ----------------- setting module-specific parameters ---------------
>
> # -- usrloc params --
>
> modparam("usrloc", "db_url", "mysql://opensips:opensips@localhost/opensips")
> modparam("usrloc", "db_mode", 2)
> modparam("usrloc", "hash_size", 12)
> modparam("usrloc", "fetch_rows", 2500)
> modparam("tm", "wt_timer", 2)
>
> # ------------------------- request routing logic -------------------
>
> # main routing logic //This is line number 54 that the error is referring to
>
> route{
>
> if(is_method("REGISTER")) {
>
> set_time_stamp("before new ul save");
> save("location");
> diff_time_stamp(1,"after ul save");
> exit;
>   }
>
> set_time_stamp("before new ul lookup");
>
> if(lookup("location")) {
>
> diff_time_stamp(1,"after ul lookup");
> sl_send_reply("200", "ok");
>   } else {
>   diff_time_stamp(1,"after ul lookup");
>
> sl_send_reply("404", "not found");
> }
>
> t_relay();
>
> }
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/CRITICAL-core-yyerror-parse-error-in-config-file-tp7037342p7038778.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CRITICAL:core:yyerror: parse error in config file

M.Abdulaziz
This post was updated on .
Hello Bogdan

I'm very Sorry I forgot to mention that I commented these fuctions they are not working at all.


Thank you for helping.

When I compile it again

>opensips -c -f registrar.cfg

udp:listening 192.168.1.69:5060

the error is gone and it starts to listen to the port

but when I compile for errors

>opensips -c registrar.cfg

The same errors still appear not only for this cfg file but when I run this command with any cfg file??


I'm over this problem now since the listen has started I assumed that it is OK to ignore this error. but the registrar.cfg is not reacting at all I don't know why?

When I run the follwing command:

>sipp 192.168.1.69:5060 -sf uac-reg.xml -inf users.txt


I got no reaction :( from opensips. is there anything wrong I am doing but not noticing??

I attached my files hope you help me.

I really appreciate your help


registrar.cfg
uac-reg.xml
users.txt
Reply | Threaded
Open this post in threaded view
|

Re: CRITICAL:core:yyerror: parse error in config file

M.Abdulaziz
Just a note I forgot to mention that in registeerar.cfg

the listen is actually = 192.168.1.69:5060 not 127.0.0.1:5060

Thank you in advance
Reply | Threaded
Open this post in threaded view
|

dispatch to Asterisk cluster behind NAT

Matt Hamilton
I have been using the dispatcher module to route calls to an Asterisk cluster with 2 servers. Initially all the servers and the phones had public IPs, so there was no need for NAT.

Our requirements have changed - we will end up having 1 public IP on the server side (phones will have public IPs), so I'm planning to assign that to the Opensips server, and put the asterisk cluster behind NAT.

Opensips Server
nic1: 1.2.3.4   (public ip)
nic2: 192.168.100.75

dispatch to:
Asterisk serverA     192.168.100.80
Asterisk serverB     192.168.100.81

Is this doable in Opensips? Even if it is, does it make sense; i.e. is it an OK design? Is there a better architecture I should look into (maybe put everything behind NAT)?

Thanks,
Matt 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: dispatch to Asterisk cluster behind NAT

Ovidiu Sas
What are you looking for is a pretty common scenario (opensips
frontending a NATed cluster of asterisk servers).  You will need to
use rtpproxy to pass media between the public and the private network.
Opensips can sit at the edge of your private network (with one
interface on the public network and the other one on the private
network) or it can sit inside the private network (and some port
forwarding is required on the firewall).

Regards,
Ovidiu Sas

On Mon, Nov 28, 2011 at 10:25 PM, Matt Hamilton <[hidden email]> wrote:

> I have been using the dispatcher module to route calls to an Asterisk
> cluster with 2 servers. Initially all the servers and the phones had public
> IPs, so there was no need for NAT.
>
> Our requirements have changed - we will end up having 1 public IP on the
> server side (phones will have public IPs), so I'm planning to assign that to
> the Opensips server, and put the asterisk cluster behind NAT.
>
> Opensips Server
> nic1: 1.2.3.4   (public ip)
> nic2: 192.168.100.75
>
> dispatch to:
> Asterisk serverA     192.168.100.80
> Asterisk serverB     192.168.100.81
>
> Is this doable in Opensips? Even if it is, does it make sense; i.e. is it an
> OK design? Is there a better architecture I should look into (maybe put
> everything behind NAT)?
>
> Thanks,
> Matt

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CRITICAL:core:yyerror: parse error in config file

Bogdan-Andrei Iancu-2
In reply to this post by M.Abdulaziz
Hi,

There is nothing like "compiling an opensips script or so".....

the "-c" flag is for check the validity of opensips script, without
actually starting opensips

the "-f file" is specifying opensips which file to use as script file.
if you do not specify, a default one will be loaded (in etc/ dir, in the
installation path).

Regards,
Bogdan

On 11/28/2011 08:44 PM, M.Abdulaziz wrote:

> Hello Bogdan
>
> I'm very Sorry I forgot to mention that I commented these fuctions they are
> not working at all.
>
>
> Thank you for helping.
>
> When I compile it again
>
>> opensips -c -f registrar.cfg
> udp:listening 192.168.1.69:5060
>
> the error is gone and it starts to listen to the port
>
> but when I compile for errors
>
>> opensips -c registrar.cfg
> The same errors still appear not only for this cfg file but when I run this
> command with any cfg file??
>
>
> I'm over this problem now since the listen has started I assumed that it is
> OK to ignore this error. but the registrar.cfg is not reacting at all I
> don't know why?
>
> When I run the follwing command:
>
>> sipp 192.168.1.69:5060 -sf uac-reg.xml -inf users.txt
>
> I got no reaction :( from opensips. is there anything wrong I am doing but
> not noticing??
>
> I attached my files hope you help me.
>
> I really appreciate your help
>
> http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7039884/registrar.cfg
> registrar.cfg
> http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7039884/uac-reg.xml
> uac-reg.xml
> http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7039884/users.txt
> users.txt
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/CRITICAL-core-yyerror-parse-error-in-config-file-tp7037342p7039884.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: dispatch to Asterisk cluster behind NAT

Matt Hamilton
In reply to this post by Ovidiu Sas
Thanks Ovidiu. I'm looking into rtpproxy.

> Opensips can sit at the edge of your private network (with one
> interface on the public network and the other one on the private
> network) or it can sit inside the private network (and some port
> forwarding is required on the firewall).

Any advantages/disadvantages of Opensips with rtpproxy at the edge (on both interfaces) vs Opensips with rtpproxy behind the firewall with the Asterisk cluster?  Initially we will be on a "secure" public network (all the endpoints on the same provider's network) so I've been told that there is no need for a firewall at least for voip traffic. Eventually we might have a public PBX uplink and need to route that traffic thru the firewall, but it seems logical to bypass the firewall at this stage.

Thanks,
Matt











_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: dispatch to Asterisk cluster behind NAT

Ovidiu Sas
Running opensips at the edge of the network is simpler then running it
behind a firewall (the config needs more tweaks).
If you don't have a lot of experience with opensips, I would recommend
running opensips on two interfaces.

Regards,
Ovidiu Sas

On Tue, Nov 29, 2011 at 8:09 AM, Matt Hamilton <[hidden email]> wrote:

> Thanks Ovidiu. I'm looking into rtpproxy.
>
>> Opensips can sit at the edge of your private network (with one
>> interface on the public network and the other one on the private
>> network) or it can sit inside the private network (and some port
>> forwarding is required on the firewall).
>
> Any advantages/disadvantages of Opensips with rtpproxy at the edge (on both
> interfaces) vs Opensips with rtpproxy behind the firewall with the Asterisk
> cluster?  Initially we will be on a "secure" public network (all the
> endpoints on the same provider's network) so I've been told that there is no
> need for a firewall at least for voip traffic. Eventually we might have a
> public PBX uplink and need to route that traffic thru the firewall, but it
> seems logical to bypass the firewall at this stage.
>
> Thanks,
> Matt

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: dispatch to Asterisk cluster behind NAT

Matt Hamilton

> Running opensips at the edge of the network is simpler then running it
> behind a firewall (the config needs more tweaks).
> If you don't have a lot of experience with opensips, I would recommend
> running opensips on two interfaces.
>

That's what I'm going to do. Thanks again.
Matt



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CRITICAL:core:yyerror: parse error in config file

M.Abdulaziz
In reply to this post by Bogdan-Andrei Iancu-2
Hi Bogdan Thank you for helping.

UAC 192.168.1.69
Opensips 192.168.1.69:5060


When I run this sipp command


> sipp 192.168.1.69:5060 -sf uac-reg.xml -inf users.txt


  I got no reaction from opensips

What is wrong? I follow every instruction that I know but with no success?

this is my configuration file

# ----------- global configuration parameters ------------------------
 
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes log_stderror=no # (cmd line: -E)
children=8
# Uncomment these lines to enter debugging mode
#fork=no
#log_stderror=yes
#
listen=udp:192.168.1.69:5060
auto_aliases=no log_name="opensips-1.5.1-log" log_facility=LOG_LOCAL0
 
# ------------------ module loading ---------------------------------- #
 
set module path mpath="/usr/local/lib64/opensips/modules/"
 
# Uncomment this if you want to use SQL database
 
loadmodule "db_mysql.so"
loadmodule "sl.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "tm.so"
 
# ----------------- setting module-specific parameters ---------------
 
# -- usrloc params --
 
modparam("usrloc", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "hash_size", 12)
modparam("usrloc", "fetch_rows", 2500)
modparam("tm", "wt_timer", 2)
 
# ------------------------- request routing logic -------------------
 
# main routing logic //This is line number 54 that the error is referring to
 
route{
 
if(is_method("REGISTER")) {
 

save("location");

exit;
 }
 

 
if(lookup("location"))
{
sl_send_reply("200", "ok");
 
}else {

 
sl_send_reply("404", "not found");

}
 
 
}


& This is my uac-reg.xml******************************************************

-<scenario name="Basic Sipstone UAC"> 

 

 -<send start_rtd="true" retrans="500"> 
<![CDATA[ REGISTER sip:[remote_ip]:[remote_port] 
SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] 
From: sipp <sip:[field0]@[remote_ip]:[local_port]>;tag=[call_number] 
To: sut <sip:[field0]@[remote_ip]:[remote_port]> 
Call-ID: [call_id] 
CSeq: 4 REGISTER 
Contact: sip:[field0]@[local_ip]:[local_port] 
Expires: 72000 
Max-Forwards: 70 
Subject: Performance Test 
Content-Type: application/sdp 
Content-Length: [len] ]]>

 </send> 


 

 


<recv rtd="true" optional="true" response="400"> 
<action> <exec int_cmd="stop_call"/> </action> 

</recv> <recv rtd="true" response="200" crlf="true"> </recv>
 

 

 

 

 <ResponseTimeRepartition value="10, 50, 100, 150, 200, 500, 1000"/> </scenario>



Hope someone can help I'm stuck without knowing where is the problem??

Thank you in advance
Reply | Threaded
Open this post in threaded view
|

Re: CRITICAL:core:yyerror: parse error in config file

osiris123d
I think before you start testing OpenSIPS with SIPP you need to make sure your config or your install of OpenSIPS is actually working. Are you able to register a softphone client? When you use ngrep or any other siptrace do you see opensips responding to anything? When you look in syslog do you see any errors? Is OpenSIPS even running (you started this email thread because you thought you had to compile the opensips config)?

On , "M.Abdulaziz" <[hidden email]> wrote:

> Hi Bogdan Thank you for helping.
>
>
>
> *UAC* 192.168.1.69
>
> *Opensips* 192.168.1.69:5060
>
>
>
>
>
> When I run this sipp command
>
>
>
>
>
> > sipp 192.168.1.69:5060 -sf uac-reg.xml -inf users.txt
>
>
>
>
>
>  * I got no reaction from opensips *
>
>
>
> What is wrong? I follow every instruction that I know but with no success?
>
>
>
> this is my configuration file
>
>
>
> # ----------- global configuration parameters ------------------------
>
>
>
> debug=3 # debug level (cmd line: -dddddddddd)
>
> fork=yes log_stderror=no # (cmd line: -E)
>
> children=8
>
> # Uncomment these lines to enter debugging mode
>
> #fork=no
>
> #log_stderror=yes
>
> #
>
> listen=udp:192.168.1.69:5060
>
> auto_aliases=no log_name="opensips-1.5.1-log" log_facility=LOG_LOCAL0
>
>
>
> # ------------------ module loading ---------------------------------- #
>
>
>
> set module path mpath="/usr/local/lib64/opensips/modules/"
>
>
>
> # Uncomment this if you want to use SQL database
>
>
>
> loadmodule "db_mysql.so"
>
> loadmodule "sl.so"
>
> loadmodule "usrloc.so"
>
> loadmodule "registrar.so"
>
> loadmodule "textops.so"
>
> loadmodule "tm.so"
>
>
>
> # ----------------- setting module-specific parameters ---------------
>
>
>
> # -- usrloc params --
>
>
>
> modparam("usrloc", "db_url",
>
> "mysql://opensips:opensipsrw@localhost/opensips")
>
> modparam("usrloc", "db_mode", 2)
>
> modparam("usrloc", "hash_size", 12)
>
> modparam("usrloc", "fetch_rows", 2500)
>
> modparam("tm", "wt_timer", 2)
>
>
>
> # ------------------------- request routing logic -------------------
>
>
>
> # main routing logic //This is line number 54 that the error is referring to
>
>
>
> route{
>
>
>
> if(is_method("REGISTER")) {
>
>
>
>
>
> save("location");
>
>
>
> exit;
>
>  }
>
>
>
>
>
>
>
> if(lookup("location"))
>
> {
>
> sl_send_reply("200", "ok");
>
>
>
> }else {
>
>
>
>
>
> sl_send_reply("404", "not found");
>
>
>
> }
>
>
>
>
>
> }
>
>
>
>
>
> *& This is my
>
> uac-reg.xml*******************************************************
>
>
>
> -
>
>
>
>
>
>
>
>  -
>
>
>
>  
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>  
>
>
>
>
>
>
>
>
>
> Hope someone can help I'm stuck without knowing where is the problem??
>
>
>
> Thank you in advance
>
>
>
> --
>
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/CRITICAL-core-yyerror-parse-error-in-config-file-tp7037342p7043541.html
>
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
>
>
> _______________________________________________
>
> Users mailing list
>
> [hidden email]
>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CRITICAL:core:yyerror: parse error in config file

M.Abdulaziz
Thank you for helping osiris


I think it is working fine & here is the proof:

I tried the follwing test

>sipp -sn uac -rsa 192.168.1.69:5061 192.168.1.69:5060

UAC(5062)--->OPENSIPS(5061)--->UAS(5060)


& traced the exchanged packets in Wireshark tool I see that everything is working fine & all calls ended successfully & (5061) port was reacting to the both sides (UAS) & (UAC) that's what makes me confused??

Is there any problem with my scripts or it is correct?

Thank you,
Reply | Threaded
Open this post in threaded view
|

opensips - asterisk registrations

Matt Hamilton
In reply to this post by Ovidiu Sas

I'm a little confused about Opensips doing the registrations for Asterisk.

I integrated Opensips with Asterisk Realtime (Asterisk sipusers/peers point to Opensips subscribe table via a view). Opensips does the authorization and saves the location. However, when a call comes in (INVITE is routed to Asterisk), it seems like Asterisk doesn't know about the user (or sees the users as not authorized), so can't create the SIP channel.

If I route the REGISTER to Asterisk after authorizing in Opensips (and doing a consume_credentials()), Asterisk does the Authorization again from scratch. In that case call goes through, but I end up duplicating the authorization process. If I don't use consume_credentials(), Asterisk's authorization challenge doesn't match with Opensips, the user is not authenticated.

I was hoping to take the load of handling registrations from Asterisk.  I'm fairly new to both Asterisk and Opensips - what am I missing?

Thanks,
Matt




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: opensips - asterisk registrations

SamyGo
Hi,
You can add a OpenSIPS peer in you asterisk sip.conf without any username and password with param "insecure=invite,port" that way your asterisk would not worry about asking for credentials on incoming INVITES from opensips.

Regards,
Sammy.

On Sun, Dec 4, 2011 at 9:28 PM, Matt Hamilton <[hidden email]> wrote:

I'm a little confused about Opensips doing the registrations for Asterisk.

I integrated Opensips with Asterisk Realtime (Asterisk sipusers/peers point to Opensips subscribe table via a view). Opensips does the authorization and saves the location. However, when a call comes in (INVITE is routed to Asterisk), it seems like Asterisk doesn't know about the user (or sees the users as not authorized), so can't create the SIP channel.

If I route the REGISTER to Asterisk after authorizing in Opensips (and doing a consume_credentials()), Asterisk does the Authorization again from scratch. In that case call goes through, but I end up duplicating the authorization process. If I don't use consume_credentials(), Asterisk's authorization challenge doesn't match with Opensips, the user is not authenticated.

I was hoping to take the load of handling registrations from Asterisk.  I'm fairly new to both Asterisk and Opensips - what am I missing?

Thanks,
Matt




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: opensips - asterisk registrations

Matt Hamilton

>You can add a OpenSIPS peer in you asterisk sip.conf without any username and password with param "insecure=invite,port"
>that way your asterisk would not worry about asking for credentials on incoming INVITES from opensips.

That's what I was looking for, thanks for both of your answers.

Regards,
Matt


On Sun, Dec 4, 2011 at 9:28 PM, Matt Hamilton <[hidden email]> wrote:

I'm a little confused about Opensips doing the registrations for Asterisk.

I integrated Opensips with Asterisk Realtime (Asterisk sipusers/peers point to Opensips subscribe table via a view). Opensips does the authorization and saves the location. However, when a call comes in (INVITE is routed to Asterisk), it seems like Asterisk doesn't know about the user (or sees the users as not authorized), so can't create the SIP channel.

If I route the REGISTER to Asterisk after authorizing in Opensips (and doing a consume_credentials()), Asterisk does the Authorization again from scratch. In that case call goes through, but I end up duplicating the authorization process. If I don't use consume_credentials(), Asterisk's authorization challenge doesn't match with Opensips, the user is not authenticated.

I was hoping to take the load of handling registrations from Asterisk.  I'm fairly new to both Asterisk and Opensips - what am I missing?

Thanks,
Matt




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
12