[Users] Can't forward to PSTN gateway

Daniel-Constantin Mierla daniel at voice-system.ro
Mon Jun 19 11:33:27 CEST 2006


Hello,

the routing in the openser side seems to be OK, as the INVITE is routed 
to the gateway. The "500 Internal Server Error" is generated by the 
gateway. It might be something that the gateway does not like in the 
INVITE. Could it be the format of the R-URI. The best way is to contact 
your gateway provider and ask what is wrong with the INVITEs you send to 
them.

Sometime the gateways send back such error even when their capacity is full.

Cheers,
Daniel


On 06/17/06 11:11, Kenny Chua wrote:
> Hi all,
>      I'm having trouble allowing calls to my pstn gateway. I get some 
> errors. These are the errors I get:
>
> I get the 404 Not Found error
>
> Here is the information I got from ngrep:
>
> U 2006/06/17 02:58:31.372496 68.xxx.xxx.17:5060 -> 192.168.1.20:5060
>   SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP 
> 192.168.1.1:5060;rport=5060;branch=z9hG4bK082837F1736B4E11832482B6D09012F5..From: 
> K
>   enny <sip:201 at mydomain.myftp.org>;tag=2300590181..To: 
> <sip:13373038435 at mydomain.myftp.org>..Call-ID: 
> 4B570DFD-0E2E-4F32-8B4B-05ADC419D0E7 at 192.168.1.20..
>   CSeq: 60451 INVITE..Server: OpenSer (1.0.1 
> (i386/linux))..Content-Length: 0..Warning: 392 192.168.1.5:5060 "Noisy 
> feedback tells:  pid=2874 req_src_ip=1
>   92.168.1.1 req_src_port=5060 
> in_uri=sip:13373038435 at mydomain.myftp.org 
> out_uri=sip:13373038435 at pstn.gateway.net:5060 via_cnt==1"....
>
> U 2006/06/17 02:58:31.487474 192.168.1.5:5060 -> 65.xxx.xxx.xxx:5060
>   INVITE sip:13373038435 at pstn.gateway.net:5060 SIP/2.0..Record-Route: 
> <sip:192.168.1.5;ftag=2300590181;lr=on>..Via: SIP/2.0/UDP 
> 192.168.1.5;branch=z9hG4bK
>   7217.285e6331.0..Via: SIP/2.0/UDP 
> 192.168.1.1:5060;rport=5060;branch=z9hG4bK082837F1736B4E11832482B6D09012F5..From: 
> Kenny <sip:201 at mydomain.myftp.org>;t
>   ag=2300590181..To: <sip:13373038435 at mydomain.myftp.org>..Contact: 
> <sip:201 at 192.168.1.1:5060>..Call-ID: 
> 4B570DFD-0E2E-4F32-8B4B-05ADC419D0E7 at 192.168.1.20
>   ..CSeq: 60451 INVITE..Max-Forwards: 69..Content-Type: 
> application/sdp..User-Agent: X-Lite release 1105x..Content-Length: 
> 304....v=0..o=201 10653130 1065
>   3152 IN IP4 68.226.254.17..s=X-Lite..c=IN IP4 192.168.1.1..t=0 
> 0..m=audio 8000 RTP/AVP 0 8 3 98 97 101..a=rtpmap:0 
> pcmu/8000..a=rtpmap:8 pcma/8000..a=rt
>   pmap:3 gsm/8000..a=rtpmap:98 iLBC/8000..a=rtpmap:97 
> speex/8000..a=rtpmap:101 telephone-event/8000..a=fmtp:101 
> 0-15..a=sendrecv..
>
> U 2006/06/17 02:58:31.545023 65.200.189.132:5060 -> 192.168.1.5:5060
>   SIP/2.0 100 Trying..Via: SIP/2.0/UDP 
> 68.226.254.17:5060;branch=z9hG4bK7217.285e6331.0..Via: SIP/2.0/UDP 
> 192.168.1.1:5060;rport=5060;branch=z9hG4bK082837
>   F1736B4E11832482B6D09012F5..From: Kenny 
> <sip:201 at mydomain.myftp.org>;tag=2300590181..To: 
> <sip:13373038435 at mydomain.myftp.org>..Call-ID: 4B570DFD-0E2E-4F
>   32-8B4B-05ADC419D0E7 at 192.168.1.20..CSeq: 60451 
> INVITE..Content-Length: 0....
>
> U 2006/06/17 02:58:31.661353 65.200.189.132:5060 -> 192.168.1.5:5060
>   SIP/2.0 500 Server Internal Error..To: 
> <sip:13373038435 at mydomain.myftp.org>;tag=3359519831-260907..From: 
> Kenny <sip:201 at mydomain.myftp.org>;tag=23005901
>   81..Call-ID: 
> 4B570DFD-0E2E-4F32-8B4B-05ADC419D0E7 at 192.168.1.20..CSeq: 60451 
> INVITE..Contact: sip:13373038435 at 65.xxx.xxx.xxx:5060..Via: SIP/2.0/UDP 
> 68.xx
>   x.xxx.17:5060;branch=z9hG4bK7217.285e6331.0..Via: SIP/2.0/UDP 
> 192.168.1.1:5060;rport=5060;branch=z9hG4bK082837F1736B4E11832482B6D09012F5..Content-Length
>   : 0....
>
> U 2006/06/17 02:58:31.661842 192.168.1.5:5060 -> xx.xxx.xxx.132:5060
>   ACK sip:13373038435 at pstn.gateway.net:5060 SIP/2.0..Via: SIP/2.0/UDP 
> 192.168.1.5;branch=z9hG4bK7217.285e6331.0..From: Kenny 
> <sip:201 at mydomain.myftp.org>;
>   tag=2300590181..Call-ID: 
> 4B570DFD-0E2E-4F32-8B4B-05ADC419D0E7 at 192.168.1.20..To: 
> <sip:13373038435 at mydomain.myftp.org>;tag=3359519831-260907..CSeq: 60451
>   ACK..User-Agent: OpenSer (1.0.1 (i386/linux))..Content-Length: 0....
>
> Below is my openser.cfg
>
> #
> # $Id: openser.cfg,v 1.5 2005/10/28 19:45:33 bogdan_iancu Exp $
> #
> # simple quick-start config script
> #
>
> # ----------- global configuration parameters ------------------------
>
> debug=3            # debug level (cmd line: -dddddddddd)
> fork=yes
> log_stderror=no    # (cmd line: -E)
>
> /* Uncomment these lines to enter debugging mode
> fork=no
> log_stderror=yes
> */
>
> # put your server IP address here
>
> listen=192.168.1.5
>
> alias=mydomain.myftp.org
>
> check_via=no    # (cmd. line: -v)
> dns=no          # (cmd. line: -r)
> rev_dns=no      # (cmd. line: -R)
> port=5060
> children=4
> fifo="/tmp/openser_fifo"
>
> fifo_db_url="mysql://openser:openserrw@localhost/openser"
>
> loadmodule "/usr/local/lib/openser/modules/mysql.so"
> loadmodule "/usr/local/lib/openser/modules/sl.so"
> loadmodule "/usr/local/lib/openser/modules/tm.so"
> loadmodule "/usr/local/lib/openser/modules/rr.so"
> loadmodule "/usr/local/lib/openser/modules/maxfwd.so"
> loadmodule "/usr/local/lib/openser/modules/usrloc.so"
> loadmodule "/usr/local/lib/openser/modules/registrar.so"
> loadmodule "/usr/local/lib/openser/modules/uri_db.so"
> loadmodule "/usr/local/lib/openser/modules/auth.so"
> loadmodule "/usr/local/lib/openser/modules/auth_db.so"
> loadmodule "/usr/local/lib/openser/modules/textops.so"
> loadmodule "/usr/local/lib/openser/modules/avpops.so"
> loadmodule "/usr/local/lib/openser/modules/domain.so"
> loadmodule "/usr/local/lib/openser/modules/xlog.so"
>
>
>
> modparam("auth_db|permissions|uri_db|usrloc", "db_url", 
> "mysql://openser:openserrw@localhost/openser")
> modparam("auth_db", "calculate_ha1", 1)
> modparam("auth_db", "password_column", "password")
> modparam("usrloc", "db_mode", 2)
> modparam("rr", "enable_full_lr", 1)
>
> modparam("tm", "fr_inv_timer", 27)
> modparam("tm", "fr_inv_timer_avp", "inv_timeout")
>
> route {
>
>     # -----------------------------------------------------------------
>     # Sanity Check Section
>     # -----------------------------------------------------------------
>     if (!mf_process_maxfwd_header("10")) {
>         sl_send_reply("483", "Too Many Hops");
>         exit;
>     };
>
>     if (msg:len > max_len) {
>         sl_send_reply("513", "Message Overflow");
>         exit;
>     };
>
>     # -----------------------------------------------------------------
>     # Record Route Section
>     # -----------------------------------------------------------------
>     if (method!="REGISTER") {
>         record_route();
>     };
>
>     # -----------------------------------------------------------------
>     # Loose Route Section
>     # -----------------------------------------------------------------
>     if (loose_route()) {
>         route(1);
>     };
>
>     # -----------------------------------------------------------------
>     # Call Type Processing Section
>     # 
> -----------------------------------------------------------------   
>     if (method=="REGISTER") {
>         xlog("Registering\n");
>         route(2);
>         return;
>     };
>
>     lookup("aliases");
>    
>     if(method =="INVITE"){
>     if( uri=~"^sip:1[0-9]*@"){
>         xlog("International call\n");
>         route(4);
>         exit;
>     };
>     };
>    
>
>     route(1);
> }
>
> route[1] {
>
>     # -----------------------------------------------------------------
>     # Default Message Handler
>     # -----------------------------------------------------------------
>     if (!t_relay()) {
>         sl_reply_error();
>     };
> }
>
> route[2] {
>
>     # -----------------------------------------------------------------
>     # REGISTER Message Handler
>     # ----------------------------------------------------------------
>     sl_send_reply("100", "Trying");
>    
>     if (!www_authorize("mydomain.myftp.org","subscriber")) {
>         www_challenge("mydomain.myftp.org","0");
>         exit;
>     };
>
>     if (!check_to()) {
>         sl_send_reply("401", "Unauthorized");
>         return;
>     };
>
>     consume_credentials();
>
>     if (!save("location")) {
>         sl_reply_error();
>     };
>    
>     xlog("Registered Successfully\n");
> }
>
> route[3] {
>     # -----------------------------------------------------------------
>     # INVITE Message Handler
>     # -----------------------------------------------------------------
>     if (!proxy_authorize("","subscriber")) {
>         proxy_challenge("","0");
>         return;
>     } else if (!check_from()) {
>         sl_send_reply("403", "Use From=ID");
>         return;
>     };
>
>      consume_credentials();
>
>     lookup("aliases");
>     if (uri!=myself) {
>         route(1);
>     };
>
>     if (!lookup("location")) {
>         sl_send_reply("404", "User Not Found");
>         exit;
>     };
>
>     route(1);
> }
>
> route[4]{
>     xlog("Before forward to host\n");
>     rewritehostport("pstn.gateway.net:5060");
>     xlog("After forward to host\n");
>     route(1);
>    
> }
>
>
> What am I doin wrong? Why am I not able to dial a PSTN line? My PSTN 
> gateway allows international calls. Any help is appreciated. Thank you.
>
> ------------------------------------------------------------------------
> Ring'em or ping'em. Make PC-to-phone calls as low as 1¢/min 
> <http://us.rd.yahoo.com/mail_us/taglines/postman11/*http://us.rd.yahoo.com/evt=39666/*http://voice.yahoo.com> 
> with Yahoo! Messenger with Voice.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list