"ngrep -t -W byline -d any port 5060" then find the desired BYE and send it... ;)
Edson
-----Original Message----- From: serusers-bounces@lists.iptel.org [mailto:serusers- bounces@lists.iptel.org] On Behalf Of flavio Sent: segunda-feira, 7 de maio de 2007 12:30 To: serusers@lists.iptel.org Subject: Re: [Serusers] SER/PSTN Gateway conf
I've tried unsuccessfully in several way =_=".
I think that issue is related to From header of BYE SIP message for the Phone over PSTN. How can I include full BYE SIP message in this case?
Moreover..Is there any full documentation about ser.cfg file sintax?
Thanks 4 support,
Flavio
2007/5/7, Greger V. Teigre greger@teigre.com:
Please include the full BYE SIP message. g-)
flavio wrote:
Hi to all, I'm newbie for SER and I'm testing my own configuration to send/receive calls through my pstn gateway, according to follow simple scenario:
Phone --> PSTN --> Gateway --> SER --> SIP Phone
I send and receive calls successfully, but when Phone over PSTN hangs up SER reply to BYE message with 404 Not Found.Here is my ser.cfg:
debug=3 fork=no log_stderror=yes listen=10.28.19.202 # INSERT YOUR IP ADDRESS HERE port=5060 children=4 dns=no rev_dns=no fifo="/tmp/ser_fifo" fifo_db_url="mysql://root@10.28.19.202/ser" loadmodule "/usr/local/lib/ser/modules/mysql.so" loadmodule "/usr/local/lib/ser/modules/sl.so" loadmodule "/usr/local/lib/ser/modules/tm.so" loadmodule "/usr/local/lib/ser/modules/rr.so" loadmodule "/usr/local/lib/ser/modules/maxfwd.so" loadmodule "/usr/local/lib/ser/modules/usrloc.so" loadmodule "/usr/local/lib/ser/modules/registrar.so" loadmodule "/usr/local/lib/ser/modules/auth.so" loadmodule "/usr/local/lib/ser/modules/auth_db.so" loadmodule "/usr/local/lib/ser/modules/uri_db.so" loadmodule "/usr/local/lib/ser/modules/avpops.so" loadmodule "/usr/local/lib/ser/modules/permissions.so" modparam("auth_db|permissions|uri_db|usrloc", "db_url", "mysql://root@10.28.19.202/ser") 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") modparam("permissions", "db_mode", 1) modparam("permissions", "trusted_table", "trusted") modparam("permissions", "default_allow_file", "/usr/local/etc/ser/permissions.allow") modparam("permissions", "default_deny_file", "/usr/local/etc/ser/permissions.deny") route { # ----------------------------------------------------------------- # Sanity Check Section # ----------------------------------------------------------------- if (!mf_process_maxfwd_header("16")) { sl_send_reply("483", "Too Many Hops"); break; }; if (msg:len > max_len) { sl_send_reply("513", "Message Overflow"); break; }; # ----------------------------------------------------------------- # Record Route Section # ----------------------------------------------------------------- if (method!="REGISTER") { record_route(); }; # ----------------------------------------------------------------- # Loose Route Section # ----------------------------------------------------------------- if (loose_route()) {
# if ((method=="INVITE" || method=="REFER") && !has_totag()) { # sl_send_reply("403", "Forbidden"); # break; # };
if (method=="INVITE") { if (!allow_trusted()) { if (!proxy_authorize("","subscriber")) { proxy_challenge("","0"); break; } else if (!check_from()) { sl_send_reply("403", "Use From=ID"); break; }; consume_credentials(); }; };
route(1); break; }; # ----------------------------------------------------------------- # Call Type Processing Section # ----------------------------------------------------------------- if (uri!=myself) { route(1); break; }; if (method=="ACK") { route(3); route(1); break; } if (method=="INVITE") { route(3); break; } else if (method=="REGISTER") { route(2); break; }; lookup("aliases"); if (uri!=myself) { route(1); break; }; if (!lookup("location")) { sl_send_reply("404", "User Not Found"); break; }; 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("","subscriber")) { www_challenge("","0"); break; }; if (!check_to()) { sl_send_reply("401", "Unauthorized"); break; }; consume_credentials(); if (!save("location")) { sl_reply_error(); }; } route[3] { # ----------------------------------------------------------------- # INVITE Message Handler # ----------------------------------------------------------------- if (!allow_trusted()) { if (!proxy_authorize("","subscriber")) { proxy_challenge("","0"); break; } else if (!check_from()) { sl_send_reply("403", "Use From=ID"); break; }; consume_credentials(); } lookup("aliases"); if (uri!=myself) { route(1); break; }; if (!lookup("location")) { if (uri=~"^sip:0[0-9]*@") { # calls to PSTN #strip(0); route(4); break; }; if(uri=~"^sip:3[0-9]*@") { calls to Mobile route(4); break; }; sl_send_reply("404", "User Not Found"); break; }; route(1); } route[4]{ #----------------------------------------------------------------- # PSTN Handler # ----------------------------------------------------------------- rewritehost("10.28.52.105"); # INSERT YOUR PSTN GATEWAY IP ADDRESS avp_write("i:45", "inv_timeout"); route(1); }
Any suggestions about my issue?
Thanks 4 all,
Flavio _______________________________________________ Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
--
- (o< ing. Patria Flavio
- //\ phone 0823451358
- V_/_ mobile 3407873357
Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers