[SR-Users] 500 I'm terribly sorry error
Daniel-Constantin Mierla
miconda at gmail.com
Mon Dec 16 14:03:57 CET 2013
Hello,
On 11/12/13 13:19, Helena Garcia-Nieto wrote:
>
> Hi,
>
> The logs weren't really helpful. I can see that it checked the from
> was server ips, and no error afterwards...
>
> I checked the configuration against the old working config I had in
> the test environment. Line by line and detected that the error is on
> the listen lines.
>
> I was listening only in the tcp:ip because I want the phones to
> connect via tcp.
>
> I assume my gw connection would be tcp as well, but it seems that it
> is udp by default?
>
> I added the listen udp:ip and then the packets are sent to the GW, but
> in udp.
>
> Is it ok for the gw since udp is also available, but I was expecting
>
> customer -- TCP --> kamailio --- TCP --> GW,
>
> Is it not the default config, should I add something special in case
> TCP to the GW is mandatory?
>
add 'transport=tcp' as parameter to the URI going to the pstn gateway.
Cheers,
Daniel
> Thanks again for the help!
>
> Helena
>
> *From:*Daniel-Constantin Mierla [mailto:miconda at gmail.com]
> *Sent:* miércoles, 11 de diciembre de 2013 11:07
> *To:* Helena Garcia-Nieto; 'Kamailio (SER) - Users Mailing List'
> *Subject:* Re: [SR-Users] 500 I'm terribly sorry error
>
> Hello,
>
> can you set debug=3 in your config file and look at the logs for more
> information on why is failing?
>
> To discover why a route block is not executed, you can use debugger
> module with cfgtrace parameter set to 1, then you will see what lines
> of configuration files are executed and spot what condition didn't
> evaluate as expected to get to the respective routing block.
>
> Cheers,
> Daniel
>
> On 11/12/13 10:51, Helena Garcia-Nieto wrote:
>
> Hey,
>
> Yes.
>
> Dec 11 08:55:45 server77-68-57-68 /usr/local/sbin/kamailio[13233]:
> ERROR: <script>: r-uri (sip:XXXXX771269 at 202.68.XX.XX:5060) to me
> it looks ok
>
> That is the printing when using the route (pstn) on the routing
> logic and only adding the xlog on the default route[PSTN]
>
> With the full config (attached)
>
> That is the trace just before entering the route (ISKRATEL)
>
> Dec 11 09:25:39 /usr/local/sbin/kamailio[15793]: ERROR: <script>:
> Helena r-uri (sip:XXX771269 at 77.XX.XX.XX:7060;transport=tcp)
>
> I was not able to get the other printings, and I'm not sure why...
> since I have the route [ISKRATEL] like:
>
> route[ISKRATEL] {
>
> xlog("L_ERR", "Helena 0 r-uri ($ru) \n");
>
> #!ifdef WITH_PSTN
>
> # check if ISKRATEL GW IP is defined
>
> xlog("L_ERR", "Helena 1 r-uri ($ru) \n");
>
> if (strempty($sel(cfg_get.iskratel.gw_ip))) {
>
> xlog("SCRIPT: PSTN rotuing enabled but
> iskratel.gw_ip not defined\n");
>
> return;
>
> }
>
> xlog("L_ERR", "Helena 2 r-uri ($ru) \n");
>
> # only local users allowed to call
>
> if(from_uri!=myself) {
>
> sl_send_reply("403", "Not Allowed");
>
> exit;
>
> }
>
> xlog("L_ERR", "Helena 3 r-uri ($ru) \n");
>
> if (strempty($sel(cfg_get.iskratel.gw_port))) {
>
> $ru = "sip:" + $rU + "@" +
> $sel(cfg_get.iskratel.gw_ip);
>
> } else {
>
> $ru = "sip:" + $rU + "@" +
> $sel(cfg_get.iskratel.gw_ip) + ":"+ $sel(cfg_get.iskratel.gw_port);
>
> xlog("L_ERR", "Helena 4 r-uri ($ru) \n");
>
> }
>
> xlog("L_ERR", "Helena 5 r-uri ($ru) \n");
>
> #MORODO Add profix to ISKRATEL: A99901
>
> subst_uri('/^sip:(.*)/sip:A99901\1/i')
> <sip:%28.*%29/sip:A99901%5C1/i%27%29>; # add A99901
>
> #MORODO TEST
>
> xlog("L_ERR", "Helena r-uri ($ru) \n");
>
> route(RELAY);
>
> exit;
>
> #!endif
>
> return;
>
> }
>
> I attach the kamailio conf file, in case you can see something on
> it. Can you advise me on why I'm not getting the xlogs inside the
> function? And where can be the problem with the 500 I'm terrible
> sorry?
>
> Thanks in advanced!
>
> Helena
>
> *From:*Daniel-Constantin Mierla [mailto:miconda at gmail.com]
> *Sent:* miércoles, 11 de diciembre de 2013 8:39
> *To:* Helena Garcia-Nieto; 'Kamailio (SER) - Users Mailing List'
> *Subject:* Re: [SR-Users] 500 I'm terribly sorry error
>
> I already told to pring the $ru, have you done it?
>
> Daniel
>
> On 10/12/13 17:09, Helena Garcia-Nieto wrote:
>
> Hi Daniel,
>
> Thanks for the answer but...
>
> I already tested if the problem is there and even commenting
> the prefix out the error is exactly the same.
>
> That is why I test it using:
>
> pstn.gw_ip = "10.XX.XX.XX"
>
> pstn.gw_port = "5060"
>
> And route(PSTN)
>
> Without changing original PSTN routing.
>
> I'm getting the same problem.
>
> Could you think on something else that can be affecting that?
>
> Helena
>
> *From:*sr-users-bounces at lists.sip-router.org
> <mailto:sr-users-bounces at lists.sip-router.org>
> [mailto:sr-users-bounces at lists.sip-router.org] *On Behalf Of
> *Daniel-Constantin Mierla
> *Sent:* martes, 10 de diciembre de 2013 16:54
> *To:* Kamailio (SER) - Users Mailing List
> *Subject:* Re: [SR-Users] 500 I'm terribly sorry error
>
> Hello,
>
> I guess the r-uri is not correct after your changes. you can
> try to print $ru with xlog(...) just before the route(RELAY).
>
> You should use string operation to add the prefix instead of
> using a regular expression substitution, like:
>
> prefix("A99901");
>
> or
>
> $rU = "A99901" + $rU;
>
> Cheers,
> Daniel
>
>
>
> On 10/12/13 16:19, Helena Garcia-Nieto wrote:
>
> Hello,
>
> Thanks in advanced for the help. I am almost new with
> kamailio and still struggling through silly problems so
> please forgive me if the solution is so obvious.
>
> I have a network like
>
> Xlitle -- Kamailio -- GW
>
> The GW is more or less out of my reach for changing the
> behaivour.
>
> As devices I have xlitle
>
> Kamailio is on version 4.0.2
>
> I've changed only few things from the default config file.
> Add mysql support, auth, userlocdb, pstngw.
>
> For this part, gw routing , I've defined gw ip and port
> inside the PSTN definition like:
>
> #!ifdef WITH_PSTN
>
> # PSTN GW Routing
>
> #
>
> # - pstn.gw_ip: valid IP or hostname as string value, example:
>
> # pstn.gw_ip = "10.0.0.101" desc "My PSTN GW Address"
>
> #
>
> # - by default is empty to avoid misrouting
>
> pstn.gw_ip = "" desc "PSTN GW Address"
>
> pstn.gw_port = "" desc "PSTN GW Port"
>
> iskratel.gw_ip = "10.XX.XX.XX"
>
> iskratel.gw_port = "5060"
>
> #!endif
>
> I route the calls with:
>
> route(ISKRATEL);
>
> And defined a routing function
>
> route[ISKRATEL] {
>
> #!ifdef WITH_PSTN
>
> # check if ISKRATEL GW IP is defined
>
> if (strempty($sel(cfg_get.iskratel.gw_ip))) {
>
> xlog("SCRIPT: PSTN rotuing enabled but
> iskratel.gw_ip not defined\n");
>
> return;
>
> }
>
> # only local users allowed to call
>
> if(from_uri!=myself) {
>
> sl_send_reply("403", "Not Allowed");
>
> exit;
>
> }
>
> if (strempty($sel(cfg_get.iskratel.gw_port))) {
>
> $ru = "sip:" + $rU + "@" +
> $sel(cfg_get.iskratel.gw_ip);
>
> } else {
>
> $ru = "sip:" + $rU + "@" +
> $sel(cfg_get.iskratel.gw_ip) + ":"
>
> +
> $sel(cfg_get.iskratel.gw_port);
>
> }
>
> # Add profix to ISKRATEL: A99901
>
> subst_uri('/^sip:(.*)/sip:A99901\1/i')
> <sip:%28.*%29/sip:A99901%5C1/i%27%29>; # add A99901
>
> route(RELAY);
>
> exit;
>
> #!endif
>
> return;
>
> }
>
> I can see that the code goes all the way to the
> route(relay) but all I can see is the 500 I'm terribly
> sorry, server error occurred (7/SL) and a second response
> 500 I'm terribly sorry, server error occurred (7/TM)
>
> I've tried defining the IP as the given pstn.gw_ip and
> route(pstn) without changing anything on the pst default
> routing but the response of the server is the same.
>
> I cannot see any special error on the logs.
>
> I have the exact same config for this part, in another
> test server and the calls go to the gw without reporting
> any error.
>
> I'll appreciate any help from you! Thanks in advanced for
> your time
>
> Helena
>
>
>
>
>
>
> _______________________________________________
>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>
> sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
>
>
> --
>
> Daniel-Constantin Mierla -http://www.asipto.com
>
> http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda
>
>
>
>
> --
>
> Daniel-Constantin Mierla -http://www.asipto.com
>
> http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda
>
>
>
> --
> Daniel-Constantin Mierla -http://www.asipto.com
> http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131216/aa85f393/attachment-0001.html>
More information about the sr-users
mailing list