[SR-Users] 500 I'm terribly sorry error

Daniel-Constantin Mierla miconda at gmail.com
Wed Dec 11 08:38:47 CET 2013


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] *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://www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131211/5e86beed/attachment-0001.html>


More information about the sr-users mailing list