Route function errors

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

Route function errors

ASHWINI NAIDU
Hi all,

    I upgraded the opensips-1.5 to the opensips in the trunk. when i run the script after the upgrade i get the following error at route functions

Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config file, line 214, column 10-11: syntax error
Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config file, line 214, column 11-12: bad routeargument
Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config file, line 300, column 9-10: syntax error
Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config file, line 300, column 10-11: bad routeargument
Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config file, line 365, column 8-9: syntax error
Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config file, line 365, column 9-10: bad routeargument
Sep  2 05:18:13 [13423] ERROR:core:main: bad config file (6 errors)

can anyone tell me what is the problem and how to solve it.



--
Thanking You,
Ashwini BR Naidu

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

Re: Route function errors

Bogdan-Andrei Iancu
Hi Ashwini,

It might be because of the work I did yesterday to add script routes
with names (and not numbers). So, are you sure you updated/downloaded
the entire source tree?

Also , please post the lines 214 and 300 to see what may be the problem.

Regards,
Bogdan

ASHWINI NAIDU wrote:

> Hi all,
>
>     I upgraded the opensips-1.5 to the opensips in the trunk. when i
> run the script after the upgrade i get the following error at route
> functions
>
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 214, column 10-11: syntax error
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 214, column 11-12: bad routeargument
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 300, column 9-10: syntax error
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 300, column 10-11: bad routeargument
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 365, column 8-9: syntax error
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 365, column 9-10: bad routeargument
> Sep  2 05:18:13 [13423] ERROR:core:main: bad config file (6 errors)
>
> can anyone tell me what is the problem and how to solve it.
>
>
>
> --
> Thanking You,
> Ashwini BR Naidu
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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: Route function errors

ASHWINI NAIDU
Hi Bogdan,

Ya i am sure that today evening itself i downloaded and updated the whole trunk

Line No 214:  route(1);
Line No 300:  route(1);




On Tue, Sep 1, 2009 at 7:09 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Ashwini,

It might be because of the work I did yesterday to add script routes
with names (and not numbers). So, are you sure you updated/downloaded
the entire source tree?

Also , please post the lines 214 and 300 to see what may be the problem.

Regards,
Bogdan

ASHWINI NAIDU wrote:
> Hi all,
>
>     I upgraded the opensips-1.5 to the opensips in the trunk. when i
> run the script after the upgrade i get the following error at route
> functions
>
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 214, column 10-11: syntax error
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 214, column 11-12: bad routeargument
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 300, column 9-10: syntax error
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 300, column 10-11: bad routeargument
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 365, column 8-9: syntax error
> Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
> file, line 365, column 9-10: bad routeargument
> Sep  2 05:18:13 [13423] ERROR:core:main: bad config file (6 errors)
>
> can anyone tell me what is the problem and how to solve it.
>
>
>
> --
> Thanking You,
> Ashwini BR Naidu
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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



--
Thanking You,
Ashwini BR Naidu

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

Re: Route function errors

Bogdan-Andrei Iancu
Hi Ashwini,

Should be fixed now. Please update from SVN.

Thanks and Regards,
Bogdan

ASHWINI NAIDU wrote:

> Hi Bogdan,
>
> Ya i am sure that today evening itself i downloaded and updated the
> whole trunk
>
> Line No 214:  route(1);
> Line No 300:  route(1);
>
>
>
>
> On Tue, Sep 1, 2009 at 7:09 PM, Bogdan-Andrei Iancu
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Ashwini,
>
>     It might be because of the work I did yesterday to add script routes
>     with names (and not numbers). So, are you sure you updated/downloaded
>     the entire source tree?
>
>     Also , please post the lines 214 and 300 to see what may be the
>     problem.
>
>     Regards,
>     Bogdan
>
>     ASHWINI NAIDU wrote:
>     > Hi all,
>     >
>     >     I upgraded the opensips-1.5 to the opensips in the trunk. when i
>     > run the script after the upgrade i get the following error at route
>     > functions
>     >
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 214, column 10-11: syntax error
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 214, column 11-12: bad routeargument
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 300, column 9-10: syntax error
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 300, column 10-11: bad routeargument
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 365, column 8-9: syntax error
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 365, column 9-10: bad routeargument
>     > Sep  2 05:18:13 [13423] ERROR:core:main: bad config file (6 errors)
>     >
>     > can anyone tell me what is the problem and how to solve it.
>     >
>     >
>     >
>     > --
>     > Thanking You,
>     > Ashwini BR Naidu
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Users mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> --
> Thanking You,
> Ashwini BR Naidu
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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: Route function errors

ASHWINI NAIDU

Hi Bogdan,

  Can you tell me if any changes have been made for t_check_trans function and sl_send_reply functions. Should i pass any arguments.


On Tue, Sep 1, 2009 at 9:28 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Ashwini,

Should be fixed now. Please update from SVN.

Thanks and Regards,
Bogdan

ASHWINI NAIDU wrote:
> Hi Bogdan,
>
> Ya i am sure that today evening itself i downloaded and updated the
> whole trunk
>
> Line No 214:  route(1);
> Line No 300:  route(1);
>
>
>
>
> On Tue, Sep 1, 2009 at 7:09 PM, Bogdan-Andrei Iancu
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Ashwini,
>
>     It might be because of the work I did yesterday to add script routes
>     with names (and not numbers). So, are you sure you updated/downloaded
>     the entire source tree?
>
>     Also , please post the lines 214 and 300 to see what may be the
>     problem.
>
>     Regards,
>     Bogdan
>
>     ASHWINI NAIDU wrote:
>     > Hi all,
>     >
>     >     I upgraded the opensips-1.5 to the opensips in the trunk. when i
>     > run the script after the upgrade i get the following error at route
>     > functions
>     >
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 214, column 10-11: syntax error
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 214, column 11-12: bad routeargument
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 300, column 9-10: syntax error
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 300, column 10-11: bad routeargument
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 365, column 8-9: syntax error
>     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error in config
>     > file, line 365, column 9-10: bad routeargument
>     > Sep  2 05:18:13 [13423] ERROR:core:main: bad config file (6 errors)
>     >
>     > can anyone tell me what is the problem and how to solve it.
>     >
>     >
>     >
>     > --
>     > Thanking You,
>     > Ashwini BR Naidu
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Users mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> --
> Thanking You,
> Ashwini BR Naidu
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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



--
Thanking You,
Ashwini BR Naidu

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

Re: Route function errors

Bogdan-Andrei Iancu

No, there are no changes on that functions - use them as so far (check
the online docs for params)

Regards,
Bogdan


ASHWINI NAIDU wrote:

>
> Hi Bogdan,
>
>   Can you tell me if any changes have been made for *t_check_trans*
> function and *sl_send_reply* functions. Should i pass any arguments.
>
>
> On Tue, Sep 1, 2009 at 9:28 PM, Bogdan-Andrei Iancu
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Ashwini,
>
>     Should be fixed now. Please update from SVN.
>
>     Thanks and Regards,
>     Bogdan
>
>     ASHWINI NAIDU wrote:
>     > Hi Bogdan,
>     >
>     > Ya i am sure that today evening itself i downloaded and updated the
>     > whole trunk
>     >
>     > Line No 214:  route(1);
>     > Line No 300:  route(1);
>     >
>     >
>     >
>     >
>     > On Tue, Sep 1, 2009 at 7:09 PM, Bogdan-Andrei Iancu
>     > <[hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>>
>     wrote:
>     >
>     >     Hi Ashwini,
>     >
>     >     It might be because of the work I did yesterday to add
>     script routes
>     >     with names (and not numbers). So, are you sure you
>     updated/downloaded
>     >     the entire source tree?
>     >
>     >     Also , please post the lines 214 and 300 to see what may be the
>     >     problem.
>     >
>     >     Regards,
>     >     Bogdan
>     >
>     >     ASHWINI NAIDU wrote:
>     >     > Hi all,
>     >     >
>     >     >     I upgraded the opensips-1.5 to the opensips in the
>     trunk. when i
>     >     > run the script after the upgrade i get the following error
>     at route
>     >     > functions
>     >     >
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 214, column 10-11: syntax error
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 214, column 11-12: bad routeargument
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 300, column 9-10: syntax error
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 300, column 10-11: bad routeargument
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 365, column 8-9: syntax error
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 365, column 9-10: bad routeargument
>     >     > Sep  2 05:18:13 [13423] ERROR:core:main: bad config file
>     (6 errors)
>     >     >
>     >     > can anyone tell me what is the problem and how to solve it.
>     >     >
>     >     >
>     >     >
>     >     > --
>     >     > Thanking You,
>     >     > Ashwini BR Naidu
>     >     >
>     >    
>     ------------------------------------------------------------------------
>     >     >
>     >     > _______________________________________________
>     >     > Users mailing list
>     >     > [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >     >
>     >
>     >
>     >     _______________________________________________
>     >     Users mailing list
>     >     [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>     >
>     >
>     >
>     > --
>     > Thanking You,
>     > Ashwini BR Naidu
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Users mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> --
> Thanking You,
> Ashwini BR Naidu
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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: Route function errors

ASHWINI NAIDU
Hi Bogdan,
  
    I use to call them as t_check_trans() but i see parse errors over there also also for sl_send_reply. that is y i asked.

On Tue, Sep 1, 2009 at 10:42 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:

No, there are no changes on that functions - use them as so far (check
the online docs for params)

Regards,
Bogdan


ASHWINI NAIDU wrote:
>
> Hi Bogdan,
>
>   Can you tell me if any changes have been made for *t_check_trans*
> function and *sl_send_reply* functions. Should i pass any arguments.
>
>
> On Tue, Sep 1, 2009 at 9:28 PM, Bogdan-Andrei Iancu
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Ashwini,
>
>     Should be fixed now. Please update from SVN.
>
>     Thanks and Regards,
>     Bogdan
>
>     ASHWINI NAIDU wrote:
>     > Hi Bogdan,
>     >
>     > Ya i am sure that today evening itself i downloaded and updated the
>     > whole trunk
>     >
>     > Line No 214:  route(1);
>     > Line No 300:  route(1);
>     >
>     >
>     >
>     >
>     > On Tue, Sep 1, 2009 at 7:09 PM, Bogdan-Andrei Iancu
>     > <[hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>>
>     wrote:
>     >
>     >     Hi Ashwini,
>     >
>     >     It might be because of the work I did yesterday to add
>     script routes
>     >     with names (and not numbers). So, are you sure you
>     updated/downloaded
>     >     the entire source tree?
>     >
>     >     Also , please post the lines 214 and 300 to see what may be the
>     >     problem.
>     >
>     >     Regards,
>     >     Bogdan
>     >
>     >     ASHWINI NAIDU wrote:
>     >     > Hi all,
>     >     >
>     >     >     I upgraded the opensips-1.5 to the opensips in the
>     trunk. when i
>     >     > run the script after the upgrade i get the following error
>     at route
>     >     > functions
>     >     >
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 214, column 10-11: syntax error
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 214, column 11-12: bad routeargument
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 300, column 9-10: syntax error
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 300, column 10-11: bad routeargument
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 365, column 8-9: syntax error
>     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse error
>     in config
>     >     > file, line 365, column 9-10: bad routeargument
>     >     > Sep  2 05:18:13 [13423] ERROR:core:main: bad config file
>     (6 errors)
>     >     >
>     >     > can anyone tell me what is the problem and how to solve it.
>     >     >
>     >     >
>     >     >
>     >     > --
>     >     > Thanking You,
>     >     > Ashwini BR Naidu
>     >     >
>     >
>     ------------------------------------------------------------------------
>     >     >
>     >     > _______________________________________________
>     >     > Users mailing list
>     >     > [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >     >
>     >
>     >
>     >     _______________________________________________
>     >     Users mailing list
>     >     [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>     >
>     >
>     >
>     > --
>     > Thanking You,
>     > Ashwini BR Naidu
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Users mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> --
> Thanking You,
> Ashwini BR Naidu
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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



--
Thanking You,
Ashwini BR Naidu

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

Re: Route function errors

Bogdan-Andrei Iancu
Could you past the script part and the error logs... ?

Regards,
Bogdan

ASHWINI NAIDU wrote:

> Hi Bogdan,
>  
>     I use to call them as t_check_trans() but i see parse errors over
> there also also for sl_send_reply. that is y i asked.
>
> On Tue, Sep 1, 2009 at 10:42 PM, Bogdan-Andrei Iancu
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>
>     No, there are no changes on that functions - use them as so far (check
>     the online docs for params)
>
>     Regards,
>     Bogdan
>
>
>     ASHWINI NAIDU wrote:
>     >
>     > Hi Bogdan,
>     >
>     >   Can you tell me if any changes have been made for *t_check_trans*
>     > function and *sl_send_reply* functions. Should i pass any arguments.
>     >
>     >
>     > On Tue, Sep 1, 2009 at 9:28 PM, Bogdan-Andrei Iancu
>     > <[hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>>
>     wrote:
>     >
>     >     Hi Ashwini,
>     >
>     >     Should be fixed now. Please update from SVN.
>     >
>     >     Thanks and Regards,
>     >     Bogdan
>     >
>     >     ASHWINI NAIDU wrote:
>     >     > Hi Bogdan,
>     >     >
>     >     > Ya i am sure that today evening itself i downloaded and
>     updated the
>     >     > whole trunk
>     >     >
>     >     > Line No 214:  route(1);
>     >     > Line No 300:  route(1);
>     >     >
>     >     >
>     >     >
>     >     >
>     >     > On Tue, Sep 1, 2009 at 7:09 PM, Bogdan-Andrei Iancu
>     >     > <[hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     <mailto:[hidden email]
>     <mailto:[hidden email]> <mailto:[hidden email]
>     <mailto:[hidden email]>>>>
>     >     wrote:
>     >     >
>     >     >     Hi Ashwini,
>     >     >
>     >     >     It might be because of the work I did yesterday to add
>     >     script routes
>     >     >     with names (and not numbers). So, are you sure you
>     >     updated/downloaded
>     >     >     the entire source tree?
>     >     >
>     >     >     Also , please post the lines 214 and 300 to see what
>     may be the
>     >     >     problem.
>     >     >
>     >     >     Regards,
>     >     >     Bogdan
>     >     >
>     >     >     ASHWINI NAIDU wrote:
>     >     >     > Hi all,
>     >     >     >
>     >     >     >     I upgraded the opensips-1.5 to the opensips in the
>     >     trunk. when i
>     >     >     > run the script after the upgrade i get the following
>     error
>     >     at route
>     >     >     > functions
>     >     >     >
>     >     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse
>     error
>     >     in config
>     >     >     > file, line 214, column 10-11: syntax error
>     >     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse
>     error
>     >     in config
>     >     >     > file, line 214, column 11-12: bad routeargument
>     >     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse
>     error
>     >     in config
>     >     >     > file, line 300, column 9-10: syntax error
>     >     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse
>     error
>     >     in config
>     >     >     > file, line 300, column 10-11: bad routeargument
>     >     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse
>     error
>     >     in config
>     >     >     > file, line 365, column 8-9: syntax error
>     >     >     > Sep  2 05:18:13 [13423] CRITICAL:core:yyerror: parse
>     error
>     >     in config
>     >     >     > file, line 365, column 9-10: bad routeargument
>     >     >     > Sep  2 05:18:13 [13423] ERROR:core:main: bad config file
>     >     (6 errors)
>     >     >     >
>     >     >     > can anyone tell me what is the problem and how to
>     solve it.
>     >     >     >
>     >     >     >
>     >     >     >
>     >     >     > --
>     >     >     > Thanking You,
>     >     >     > Ashwini BR Naidu
>     >     >     >
>     >     >
>     >    
>     ------------------------------------------------------------------------
>     >     >     >
>     >     >     > _______________________________________________
>     >     >     > Users mailing list
>     >     >     > [hidden email]
>     <mailto:[hidden email]> <mailto:[hidden email]
>     <mailto:[hidden email]>>
>     >     <mailto:[hidden email]
>     <mailto:[hidden email]> <mailto:[hidden email]
>     <mailto:[hidden email]>>>
>     >     >     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >     >     >
>     >     >
>     >     >
>     >     >     _______________________________________________
>     >     >     Users mailing list
>     >     >     [hidden email]
>     <mailto:[hidden email]> <mailto:[hidden email]
>     <mailto:[hidden email]>>
>     >     <mailto:[hidden email]
>     <mailto:[hidden email]> <mailto:[hidden email]
>     <mailto:[hidden email]>>>
>     >     >     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >     >
>     >     >
>     >     >
>     >     >
>     >     > --
>     >     > Thanking You,
>     >     > Ashwini BR Naidu
>     >     >
>     >    
>     ------------------------------------------------------------------------
>     >     >
>     >     > _______________________________________________
>     >     > Users mailing list
>     >     > [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >     >
>     >
>     >
>     >     _______________________________________________
>     >     Users mailing list
>     >     [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>     >
>     >
>     >
>     > --
>     > Thanking You,
>     > Ashwini BR Naidu
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Users mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> --
> Thanking You,
> Ashwini BR Naidu
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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: Drouting problem

Sebastian Sastre-2-2

Hello

As per bogdan's recommendation I used the dialplan module to convert the
soruce ip to a group number, but drouting is not able to get it.
dp_translates the given ip to the correct group number, but when passing it
to drouting, it can't find it.

Any ideas?

route[2]{
        xlog("-> Route(2) - Enter\n");
        dp_translate("1", "$fd/$avp(dr_id)");
        xlog("-> HOST $fd got group $avp(dr_id) \n");
        if (!do_routing("$avp(dr_id)")){
                xlog("-> Route(2) - No routes found \n");
                sl_send_reply("503", "No available gateways route");
                exit;
        }
        xlog("-> Route(2) - Found Routes for request, routing... \n");
}


This is the log

/usr/sbin/opensips[8188]: -> Route(2) - Enter
/usr/sbin/opensips[8188]: DBG:dialplan:dp_get_ivalue: integer value
/usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: dpid is 1
/usr/sbin/opensips[8188]: DBG:dialplan:dp_get_svalue: searching 20
/usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: input is 192.168.0.10
/usr/sbin/opensips[8188]: DBG:dialplan:translate: regex operator testing
/usr/sbin/opensips[8188]: DBG:dialplan:test_match: test string 192.168.0.10
against a pattern 192.168.0.10

/usr/sbin/opensips[8188]: DBG:dialplan:test_match: test_match:[0]
192.168.0.10

/usr/sbin/opensips[8188]: DBG:dialplan:translate: found a matching rule
0x7fa7fe6898d0: pr 0, match_exp 192.168.0.10

/usr/sbin/opensips[8188]: DBG:dialplan:rule_translate: simply replace the
string, subst_comp (nil), n_escapes 0

/usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: input 192.168.0.10
with dpid 1 => output 100

/usr/sbin/opensips[8188]: -> HOST 192.168.0.10 got group 100
/usr/sbin/opensips[8188]: ERROR:drouting:do_routing: failed to get group id
/usr/sbin/opensips[8188]: -> Route(2) - No routes found



Thanks again,


Sebastian Sastre

 





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

Re: Drouting problem

Bogdan-Andrei Iancu
Hi Sebastian,

The problem is that the dialplan returns the 200 ID as string value,the
"200" string, while the drouting module does expect an integer value.

So use a transformation to convert from string to integer :
     do_routing("$(avp(dr_id){s.int})")

See: http://www.opensips.org/Resources/DocsCoreTran15#toc2

Regards,
Bogdan

Sebastian Sastre wrote:

> Hello
>
> As per bogdan's recommendation I used the dialplan module to convert the
> soruce ip to a group number, but drouting is not able to get it.
> dp_translates the given ip to the correct group number, but when passing it
> to drouting, it can't find it.
>
> Any ideas?
>
> route[2]{
>         xlog("-> Route(2) - Enter\n");
>         dp_translate("1", "$fd/$avp(dr_id)");
>         xlog("-> HOST $fd got group $avp(dr_id) \n");
>         if (!do_routing("$avp(dr_id)")){
>                 xlog("-> Route(2) - No routes found \n");
>                 sl_send_reply("503", "No available gateways route");
>                 exit;
>         }
>         xlog("-> Route(2) - Found Routes for request, routing... \n");
> }
>
>
> This is the log
>
> /usr/sbin/opensips[8188]: -> Route(2) - Enter
> /usr/sbin/opensips[8188]: DBG:dialplan:dp_get_ivalue: integer value
> /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: dpid is 1
> /usr/sbin/opensips[8188]: DBG:dialplan:dp_get_svalue: searching 20
> /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: input is 192.168.0.10
> /usr/sbin/opensips[8188]: DBG:dialplan:translate: regex operator testing
> /usr/sbin/opensips[8188]: DBG:dialplan:test_match: test string 192.168.0.10
> against a pattern 192.168.0.10
>
> /usr/sbin/opensips[8188]: DBG:dialplan:test_match: test_match:[0]
> 192.168.0.10
>
> /usr/sbin/opensips[8188]: DBG:dialplan:translate: found a matching rule
> 0x7fa7fe6898d0: pr 0, match_exp 192.168.0.10
>
> /usr/sbin/opensips[8188]: DBG:dialplan:rule_translate: simply replace the
> string, subst_comp (nil), n_escapes 0
>
> /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: input 192.168.0.10
> with dpid 1 => output 100
>
> /usr/sbin/opensips[8188]: -> HOST 192.168.0.10 got group 100
> /usr/sbin/opensips[8188]: ERROR:drouting:do_routing: failed to get group id
> /usr/sbin/opensips[8188]: -> Route(2) - No routes found
>
>
>
> Thanks again,
>
>
> Sebastian Sastre
>
>  
>
>
>
>
>
> _______________________________________________
> 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
|

struct sip_msg

Ghaith ALKAYYEM
Hello list,

I was trying to play with the SIP header, So when i tried to access the
fields (to,from) in the sip_msg structure through a module c function
they were NULL and everything was included in the field headers.
I'd like to know whether there's something wrong or it's natural for
these fields to be NULL.

struct sip_msg {
        unsigned int id;               /* message id, unique/process*/
        struct msg_start first_line;   /* Message first line */
        struct via_body* via1;         /* The first via */
        struct via_body* via2;         /* The second via */
        struct hdr_field* headers;     /* All the parsed headers*/
        struct hdr_field* last_header; /* Pointer to the last parsed header*/
        hdr_flags_t parsed_flag;       /* Already parsed header field types */

        /* Via, To, CSeq, Call-Id, From, end of header*/
        /* pointers to the first occurrences of these headers;
         * everything is also saved in 'headers' (see above)
         */

        /* shorcuts to known headers */
        struct hdr_field* h_via1;
        struct hdr_field* h_via2;
        struct hdr_field* callid;
        struct hdr_field* to;
        struct hdr_field* cseq;
        struct hdr_field* from;
        ...
        ...


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

Re: struct sip_msg

Anca Vamanu-2
Hi Ghaith,

You must explicitly call parse_headers for the message to be parsed and
for the fields in sip_msg to be filled.
Example:
    parse_headers(msg,HDR_EOH_F, 0); -  will parse all headers.

However beware that this function will not parse the headers value also.
You must call the parse function for that header and it will fill the
'parsed' filed of the struct hdr_field with a structure specific for
that filed
Example: If you want to parse the value of the Contact header filed, you
call
    parse_contact(msg->contact).
and it will fill the parsed filed with a contact_body_t structure that
contains the parsed value of the Contact header.
    (contact_body_t* )msg->contact->parsed;

I suggest learning by example technique :), look in other modules that
use the parser and see how it is done there. One option is function
*extract_sdialog_info* function from modules/presence/subscribe.c file.

Regards,
Anca

Ghaith ALKAYYEM wrote:

> Hello list,
>
> I was trying to play with the SIP header, So when i tried to access the
> fields (to,from) in the sip_msg structure through a module c function
> they were NULL and everything was included in the field headers.
> I'd like to know whether there's something wrong or it's natural for
> these fields to be NULL.
>
> struct sip_msg {
> unsigned int id;               /* message id, unique/process*/
> struct msg_start first_line;   /* Message first line */
> struct via_body* via1;         /* The first via */
> struct via_body* via2;         /* The second via */
> struct hdr_field* headers;     /* All the parsed headers*/
> struct hdr_field* last_header; /* Pointer to the last parsed header*/
> hdr_flags_t parsed_flag;       /* Already parsed header field types */
>
> /* Via, To, CSeq, Call-Id, From, end of header*/
> /* pointers to the first occurrences of these headers;
> * everything is also saved in 'headers' (see above)
> */
>
> /* shorcuts to known headers */
> struct hdr_field* h_via1;
> struct hdr_field* h_via2;
> struct hdr_field* callid;
> struct hdr_field* to;
> struct hdr_field* cseq;
> struct hdr_field* from;
> ...
> ...
>
>
> _______________________________________________
> 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: Drouting problem

Brett Nemeroff
In reply to this post by Bogdan-Andrei Iancu
Bogdan,
I'm a little confused as to which modules can take avp transformations INSIDE of the parameters and which can't..

For example, I didn't think this worked (as you suggested):
     do_routing("$(avp(dr_id){s.int})

I thought you had to do:
     $avp(n_dr_id) = $(avp(dr_id){s.int});
     do_routing("$avp(n_dr_id)");

Thanks,
Brett


On Wed, Sep 2, 2009 at 3:34 AM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Sebastian,

The problem is that the dialplan returns the 200 ID as string value,the
"200" string, while the drouting module does expect an integer value.

So use a transformation to convert from string to integer :
    do_routing("$(avp(dr_id){s.int})")

See: http://www.opensips.org/Resources/DocsCoreTran15#toc2

Regards,
Bogdan

Sebastian Sastre wrote:
> Hello
>
> As per bogdan's recommendation I used the dialplan module to convert the
> soruce ip to a group number, but drouting is not able to get it.
> dp_translates the given ip to the correct group number, but when passing it
> to drouting, it can't find it.
>
> Any ideas?
>
> route[2]{
>         xlog("-> Route(2) - Enter\n");
>         dp_translate("1", "$fd/$avp(dr_id)");
>         xlog("-> HOST $fd got group $avp(dr_id) \n");
>         if (!do_routing("$avp(dr_id)")){
>                 xlog("-> Route(2) - No routes found \n");
>                 sl_send_reply("503", "No available gateways route");
>                 exit;
>         }
>         xlog("-> Route(2) - Found Routes for request, routing... \n");
> }
>
>
> This is the log
>
> /usr/sbin/opensips[8188]: -> Route(2) - Enter
> /usr/sbin/opensips[8188]: DBG:dialplan:dp_get_ivalue: integer value
> /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: dpid is 1
> /usr/sbin/opensips[8188]: DBG:dialplan:dp_get_svalue: searching 20
> /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: input is 192.168.0.10
> /usr/sbin/opensips[8188]: DBG:dialplan:translate: regex operator testing
> /usr/sbin/opensips[8188]: DBG:dialplan:test_match: test string 192.168.0.10
> against a pattern 192.168.0.10
>
> /usr/sbin/opensips[8188]: DBG:dialplan:test_match: test_match:[0]
> 192.168.0.10
>
> /usr/sbin/opensips[8188]: DBG:dialplan:translate: found a matching rule
> 0x7fa7fe6898d0: pr 0, match_exp 192.168.0.10
>
> /usr/sbin/opensips[8188]: DBG:dialplan:rule_translate: simply replace the
> string, subst_comp (nil), n_escapes 0
>
> /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: input 192.168.0.10
> with dpid 1 => output 100
>
> /usr/sbin/opensips[8188]: -> HOST 192.168.0.10 got group 100
> /usr/sbin/opensips[8188]: ERROR:drouting:do_routing: failed to get group id
> /usr/sbin/opensips[8188]: -> Route(2) - No routes found
>
>
>
> Thanks again,
>
>
> Sebastian Sastre
>
>
>
>
>
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Drouting problem

Bogdan-Andrei Iancu
Hi Brett,

:D oh...I'm wrong - i forgot that DR accepts only avps and not generic
PVs ; when a generic PV is evaluated, you can use transformations (as
they will be used), but in this particular case (only AVPs), the
transformation will not be automatically applied :(.

So, you are right, here the correct way to do it is via an intermediary
INT AVP.

Regards,
Bogdan

Brett Nemeroff wrote:

> Bogdan,
> I'm a little confused as to which modules can take avp transformations
> INSIDE of the parameters and which can't..
>
> For example, I didn't think this worked (as you suggested):
>      do_routing("$(avp(dr_id){s.int <http://s.int>})
>
> I thought you had to do:
>      $avp(n_dr_id) = $(avp(dr_id){s.int <http://s.int>});
>      do_routing("$avp(n_dr_id)");
>
> Thanks,
> Brett
>
>
> On Wed, Sep 2, 2009 at 3:34 AM, Bogdan-Andrei Iancu
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Sebastian,
>
>     The problem is that the dialplan returns the 200 ID as string
>     value,the
>     "200" string, while the drouting module does expect an integer value.
>
>     So use a transformation to convert from string to integer :
>         do_routing("$(avp(dr_id){s.int <http://s.int>})")
>
>     See: http://www.opensips.org/Resources/DocsCoreTran15#toc2
>
>     Regards,
>     Bogdan
>
>     Sebastian Sastre wrote:
>     > Hello
>     >
>     > As per bogdan's recommendation I used the dialplan module to
>     convert the
>     > soruce ip to a group number, but drouting is not able to get it.
>     > dp_translates the given ip to the correct group number, but when
>     passing it
>     > to drouting, it can't find it.
>     >
>     > Any ideas?
>     >
>     > route[2]{
>     >         xlog("-> Route(2) - Enter\n");
>     >         dp_translate("1", "$fd/$avp(dr_id)");
>     >         xlog("-> HOST $fd got group $avp(dr_id) \n");
>     >         if (!do_routing("$avp(dr_id)")){
>     >                 xlog("-> Route(2) - No routes found \n");
>     >                 sl_send_reply("503", "No available gateways route");
>     >                 exit;
>     >         }
>     >         xlog("-> Route(2) - Found Routes for request, routing...
>     \n");
>     > }
>     >
>     >
>     > This is the log
>     >
>     > /usr/sbin/opensips[8188]: -> Route(2) - Enter
>     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_get_ivalue: integer value
>     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: dpid is 1
>     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_get_svalue: searching 20
>     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: input is
>     192.168.0.10
>     > /usr/sbin/opensips[8188]: DBG:dialplan:translate: regex operator
>     testing
>     > /usr/sbin/opensips[8188]: DBG:dialplan:test_match: test string
>     192.168.0.10
>     > against a pattern 192.168.0.10
>     >
>     > /usr/sbin/opensips[8188]: DBG:dialplan:test_match: test_match:[0]
>     > 192.168.0.10
>     >
>     > /usr/sbin/opensips[8188]: DBG:dialplan:translate: found a
>     matching rule
>     > 0x7fa7fe6898d0: pr 0, match_exp 192.168.0.10
>     >
>     > /usr/sbin/opensips[8188]: DBG:dialplan:rule_translate: simply
>     replace the
>     > string, subst_comp (nil), n_escapes 0
>     >
>     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: input
>     192.168.0.10
>     > with dpid 1 => output 100
>     >
>     > /usr/sbin/opensips[8188]: -> HOST 192.168.0.10 got group 100
>     > /usr/sbin/opensips[8188]: ERROR:drouting:do_routing: failed to
>     get group id
>     > /usr/sbin/opensips[8188]: -> Route(2) - No routes found
>     >
>     >
>     >
>     > Thanks again,
>     >
>     >
>     > Sebastian Sastre
>     >
>     >
>     >
>     >
>     >
>     >
>     >
>     > _______________________________________________
>     > Users mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>     >
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[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
Reply | Threaded
Open this post in threaded view
|

Re: struct sip_msg

Ghaith ALKAYYEM
In reply to this post by Anca Vamanu-2
Thank you very much for these valuable information, actually I'm trying
to learn how to develop new module, and i expected that those fields
should be filled upon the receipt of any external message.
Regards.

On Wed, 2009-09-02 at 15:37 +0300, Anca Vamanu wrote:

> Hi Ghaith,
>
> You must explicitly call parse_headers for the message to be parsed and
> for the fields in sip_msg to be filled.
> Example:
>     parse_headers(msg,HDR_EOH_F, 0); -  will parse all headers.
>
> However beware that this function will not parse the headers value also.
> You must call the parse function for that header and it will fill the
> 'parsed' filed of the struct hdr_field with a structure specific for
> that filed
> Example: If you want to parse the value of the Contact header filed, you
> call
>     parse_contact(msg->contact).
> and it will fill the parsed filed with a contact_body_t structure that
> contains the parsed value of the Contact header.
>     (contact_body_t* )msg->contact->parsed;
>
> I suggest learning by example technique :), look in other modules that
> use the parser and see how it is done there. One option is function
> *extract_sdialog_info* function from modules/presence/subscribe.c file.
>
> Regards,
> Anca
>
> Ghaith ALKAYYEM wrote:
> > Hello list,
> >
> > I was trying to play with the SIP header, So when i tried to access the
> > fields (to,from) in the sip_msg structure through a module c function
> > they were NULL and everything was included in the field headers.
> > I'd like to know whether there's something wrong or it's natural for
> > these fields to be NULL.
> >
> > struct sip_msg {
> > unsigned int id;               /* message id, unique/process*/
> > struct msg_start first_line;   /* Message first line */
> > struct via_body* via1;         /* The first via */
> > struct via_body* via2;         /* The second via */
> > struct hdr_field* headers;     /* All the parsed headers*/
> > struct hdr_field* last_header; /* Pointer to the last parsed header*/
> > hdr_flags_t parsed_flag;       /* Already parsed header field types */
> >
> > /* Via, To, CSeq, Call-Id, From, end of header*/
> > /* pointers to the first occurrences of these headers;
> > * everything is also saved in 'headers' (see above)
> > */
> >
> > /* shorcuts to known headers */
> > struct hdr_field* h_via1;
> > struct hdr_field* h_via2;
> > struct hdr_field* callid;
> > struct hdr_field* to;
> > struct hdr_field* cseq;
> > struct hdr_field* from;
> > ...
> > ...
> >
> >
> > _______________________________________________
> > 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
Reply | Threaded
Open this post in threaded view
|

Re: Drouting problem

Brett Nemeroff
In reply to this post by Bogdan-Andrei Iancu
Bogdan,
I just read the docs it says: 
"The module can take one optional parameter: the routing group the caller belongs to - this may be a static numerical value or an AVP specification. If none specified, the function will automatically try to query the dr_group table to get this information."

I have a request. A "quick reference card" that lists, in very abbreviated form all the module functions and parameters and the allowed values of the parameters.. Perhaps the parameters should be listed like "C" function declarations:

function do_routing(avp "[group id]")

or if it supported avp and/or pv:
function do_routing(avp/pv "[group id]")

Something like that. .a cheat sheet with one func per line would be really handy (hyperlinked, even better!!) :)

-Brett


On Wed, Sep 2, 2009 at 8:01 AM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Brett,

:D oh...I'm wrong - i forgot that DR accepts only avps and not generic
PVs ; when a generic PV is evaluated, you can use transformations (as
they will be used), but in this particular case (only AVPs), the
transformation will not be automatically applied :(.

So, you are right, here the correct way to do it is via an intermediary
INT AVP.

Regards,
Bogdan

Brett Nemeroff wrote:
> Bogdan,
> I'm a little confused as to which modules can take avp transformations
> INSIDE of the parameters and which can't..
>
> For example, I didn't think this worked (as you suggested):
>      do_routing("$(avp(dr_id){s.int <http://s.int>})
>
> I thought you had to do:
>      $avp(n_dr_id) = $(avp(dr_id){s.int <http://s.int>});
>      do_routing("$avp(n_dr_id)");
>
> Thanks,
> Brett
>
>
> On Wed, Sep 2, 2009 at 3:34 AM, Bogdan-Andrei Iancu
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Sebastian,
>
>     The problem is that the dialplan returns the 200 ID as string
>     value,the
>     "200" string, while the drouting module does expect an integer value.
>
>     So use a transformation to convert from string to integer :
>         do_routing("$(avp(dr_id){s.int <http://s.int>})")
>
>     See: http://www.opensips.org/Resources/DocsCoreTran15#toc2
>
>     Regards,
>     Bogdan
>
>     Sebastian Sastre wrote:
>     > Hello
>     >
>     > As per bogdan's recommendation I used the dialplan module to
>     convert the
>     > soruce ip to a group number, but drouting is not able to get it.
>     > dp_translates the given ip to the correct group number, but when
>     passing it
>     > to drouting, it can't find it.
>     >
>     > Any ideas?
>     >
>     > route[2]{
>     >         xlog("-> Route(2) - Enter\n");
>     >         dp_translate("1", "$fd/$avp(dr_id)");
>     >         xlog("-> HOST $fd got group $avp(dr_id) \n");
>     >         if (!do_routing("$avp(dr_id)")){
>     >                 xlog("-> Route(2) - No routes found \n");
>     >                 sl_send_reply("503", "No available gateways route");
>     >                 exit;
>     >         }
>     >         xlog("-> Route(2) - Found Routes for request, routing...
>     \n");
>     > }
>     >
>     >
>     > This is the log
>     >
>     > /usr/sbin/opensips[8188]: -> Route(2) - Enter
>     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_get_ivalue: integer value
>     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: dpid is 1
>     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_get_svalue: searching 20
>     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: input is
>     192.168.0.10
>     > /usr/sbin/opensips[8188]: DBG:dialplan:translate: regex operator
>     testing
>     > /usr/sbin/opensips[8188]: DBG:dialplan:test_match: test string
>     192.168.0.10
>     > against a pattern 192.168.0.10
>     >
>     > /usr/sbin/opensips[8188]: DBG:dialplan:test_match: test_match:[0]
>     > 192.168.0.10
>     >
>     > /usr/sbin/opensips[8188]: DBG:dialplan:translate: found a
>     matching rule
>     > 0x7fa7fe6898d0: pr 0, match_exp 192.168.0.10
>     >
>     > /usr/sbin/opensips[8188]: DBG:dialplan:rule_translate: simply
>     replace the
>     > string, subst_comp (nil), n_escapes 0
>     >
>     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: input
>     192.168.0.10
>     > with dpid 1 => output 100
>     >
>     > /usr/sbin/opensips[8188]: -> HOST 192.168.0.10 got group 100
>     > /usr/sbin/opensips[8188]: ERROR:drouting:do_routing: failed to
>     get group id
>     > /usr/sbin/opensips[8188]: -> Route(2) - No routes found
>     >
>     >
>     >
>     > Thanks again,
>     >
>     >
>     > Sebastian Sastre
>     >
>     >
>     >
>     >
>     >
>     >
>     >
>     > _______________________________________________
>     > Users mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>     >
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[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


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

Re: Drouting problem

Bogdan-Andrei Iancu
Hi Brett,

indeed, so far there was no standardization of how to describe the
params that may takes different vals - I mean as notation and not as
text description.

But I admit it will be a good idea to do so.

Regards,
bogdan

Brett Nemeroff wrote:

> Bogdan,
> I just read the docs it says:
> "The module can take one optional parameter: the routing group the
> caller belongs to - this may be a static numerical value or an AVP
> specification. If none specified, the function will automatically try
> to query the dr_group table to get this information."
>
> I have a request. A "quick reference card" that lists, in very
> abbreviated form all the module functions and parameters and the
> allowed values of the parameters.. Perhaps the parameters should be
> listed like "C" function declarations:
>
> function do_routing(avp "[group id]")
>
> or if it supported avp and/or pv:
> function do_routing(avp/pv "[group id]")
>
> Something like that. .a cheat sheet with one func per line would be
> really handy (hyperlinked, even better!!) :)
>
> -Brett
>
>
> On Wed, Sep 2, 2009 at 8:01 AM, Bogdan-Andrei Iancu
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Brett,
>
>     :D oh...I'm wrong - i forgot that DR accepts only avps and not generic
>     PVs ; when a generic PV is evaluated, you can use transformations (as
>     they will be used), but in this particular case (only AVPs), the
>     transformation will not be automatically applied :(.
>
>     So, you are right, here the correct way to do it is via an
>     intermediary
>     INT AVP.
>
>     Regards,
>     Bogdan
>
>     Brett Nemeroff wrote:
>     > Bogdan,
>     > I'm a little confused as to which modules can take avp
>     transformations
>     > INSIDE of the parameters and which can't..
>     >
>     > For example, I didn't think this worked (as you suggested):
>     >      do_routing("$(avp(dr_id){s.int <http://s.int> <http://s.int>})
>     >
>     > I thought you had to do:
>     >      $avp(n_dr_id) = $(avp(dr_id){s.int <http://s.int>
>     <http://s.int>});
>     >      do_routing("$avp(n_dr_id)");
>     >
>     > Thanks,
>     > Brett
>     >
>     >
>     > On Wed, Sep 2, 2009 at 3:34 AM, Bogdan-Andrei Iancu
>     > <[hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>>
>     wrote:
>     >
>     >     Hi Sebastian,
>     >
>     >     The problem is that the dialplan returns the 200 ID as string
>     >     value,the
>     >     "200" string, while the drouting module does expect an
>     integer value.
>     >
>     >     So use a transformation to convert from string to integer :
>     >         do_routing("$(avp(dr_id){s.int <http://s.int>
>     <http://s.int>})")
>     >
>     >     See: http://www.opensips.org/Resources/DocsCoreTran15#toc2
>     >
>     >     Regards,
>     >     Bogdan
>     >
>     >     Sebastian Sastre wrote:
>     >     > Hello
>     >     >
>     >     > As per bogdan's recommendation I used the dialplan module to
>     >     convert the
>     >     > soruce ip to a group number, but drouting is not able to
>     get it.
>     >     > dp_translates the given ip to the correct group number,
>     but when
>     >     passing it
>     >     > to drouting, it can't find it.
>     >     >
>     >     > Any ideas?
>     >     >
>     >     > route[2]{
>     >     >         xlog("-> Route(2) - Enter\n");
>     >     >         dp_translate("1", "$fd/$avp(dr_id)");
>     >     >         xlog("-> HOST $fd got group $avp(dr_id) \n");
>     >     >         if (!do_routing("$avp(dr_id)")){
>     >     >                 xlog("-> Route(2) - No routes found \n");
>     >     >                 sl_send_reply("503", "No available
>     gateways route");
>     >     >                 exit;
>     >     >         }
>     >     >         xlog("-> Route(2) - Found Routes for request,
>     routing...
>     >     \n");
>     >     > }
>     >     >
>     >     >
>     >     > This is the log
>     >     >
>     >     > /usr/sbin/opensips[8188]: -> Route(2) - Enter
>     >     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_get_ivalue:
>     integer value
>     >     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f:
>     dpid is 1
>     >     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_get_svalue:
>     searching 20
>     >     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f:
>     input is
>     >     192.168.0.10
>     >     > /usr/sbin/opensips[8188]: DBG:dialplan:translate: regex
>     operator
>     >     testing
>     >     > /usr/sbin/opensips[8188]: DBG:dialplan:test_match: test string
>     >     192.168.0.10
>     >     > against a pattern 192.168.0.10
>     >     >
>     >     > /usr/sbin/opensips[8188]: DBG:dialplan:test_match:
>     test_match:[0]
>     >     > 192.168.0.10
>     >     >
>     >     > /usr/sbin/opensips[8188]: DBG:dialplan:translate: found a
>     >     matching rule
>     >     > 0x7fa7fe6898d0: pr 0, match_exp 192.168.0.10
>     >     >
>     >     > /usr/sbin/opensips[8188]: DBG:dialplan:rule_translate: simply
>     >     replace the
>     >     > string, subst_comp (nil), n_escapes 0
>     >     >
>     >     > /usr/sbin/opensips[8188]: DBG:dialplan:dp_translate_f: input
>     >     192.168.0.10
>     >     > with dpid 1 => output 100
>     >     >
>     >     > /usr/sbin/opensips[8188]: -> HOST 192.168.0.10 got group 100
>     >     > /usr/sbin/opensips[8188]: ERROR:drouting:do_routing: failed to
>     >     get group id
>     >     > /usr/sbin/opensips[8188]: -> Route(2) - No routes found
>     >     >
>     >     >
>     >     >
>     >     > Thanks again,
>     >     >
>     >     >
>     >     > Sebastian Sastre
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     > _______________________________________________
>     >     > Users mailing list
>     >     > [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >     >
>     >     >
>     >
>     >
>     >     _______________________________________________
>     >     Users mailing list
>     >     [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>     >     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Users mailing list
>     > [hidden email] <mailto:[hidden email]>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     >
>
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[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