Steve and all, Did you ever get resolution on the issue of the timeout and t_on_failure commands killing or routing PSTN calls to voicemail?
I looked through the mail archives and it isn't clear what the resolution was. I'm running into the same problem. If I set t_on_failure to occur after a certain timeout, outgoing PSTN calls fail after that timeout as well.
In fact, it seems that calls fail after the timeout even if t_on_failure isn't set.
I've successfully gotten outgoing PSTN calls being handled by a different t_relay than incoming or internal network calls.
What did you do to resolve the issue?
My config.
RedHat 9.0 kernel 2.4.20-20smp ser 0.8.11 (i386/linux) main.c, v 1.162.2.5
Also, when a Status: 486 (busy) is encountered on the recieving party side, or a timeout occurs due to fr_inv_timer, I'm getting this error in my log
Sep 25 14:07:56 jiffypop /usr/local/sbin/ser[23164]: ERROR: t_newtran: transaction already in process 0x422c0b38
Anyone have any ideas on what the problem is? ser.cft and ngrep output attached.
Thanks, G
Steve Dolloff sdolloff@noc.dls.net wrote:
I did place this portion inside the myself check and it still tries to transfer to vm after the time expires.
I'm puzzled -- did not you want to transfer to vm after the time
expires?
I will try to make this clearer. I am behind an ATA with a SIP proxy of 209.242.10.153. If I call someone else registered on my domain and they are not available, I want to go to voice mail. If I call 1-800-555-1212 from my phone, I do not want my sip proxy to reroute the call to voicemail after 10 seconds if no one answers(or ever for that matter). Right now if I dial 18005551212 from my handset, I see the destination as sip:18005551212@209.242.10.153 on the server which matches to myself and ser tries to send it to voicemail.
Someone calling into the network is not a problem. They will never hit our server unless the destination is local.
This is the part that I really need help with! When the call timer fails, the call goes to the route[1]. How do I get it into voice mail from that point?
See bellow, I think that should work.
This is what I had originally, and I get the following syslog.
Sep 10 16:36:36 voip2 ser: parse error (127,37-38): Command cannot be used in the block Sep 10 16:36:36 voip2 ser: ERROR: bad config file (1 errors) Sep 10 16:36:36 voip2 ser: ser startup failed
Is says that vm is not valid in the block. According the admin guide, only certain commands can be used within a failure block. I assume that is the problem here. If not, please let me know as this is exactly what I want to do.
THE SAME STUFF LIKE ABOVE, YOU DON'T WANT TO t_relay ANYTHING
if(!vm("/tmp/am_fifo","voicemail")){ t_reply("500", "SEMS error"); }; break;
_______________________________________________ Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
--------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search
# # $Id: ser.cfg,v 1.20 2003/05/31 21:12:19 jiri 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 debug=8 fork=no log_stderror=yes */
check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) port=5060 children=4 fifo="/tmp/ser_fifo" sip_warning=no # # ------------------ module loading ---------------------------------- # # Uncomment this if you want to use SQL database 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/vm.so" loadmodule "/usr/local/lib/ser/modules/pa.so" loadmodule "/usr/local/lib/ser/modules/msilo.so" loadmodule "/usr/local/lib/ser/modules/acc.so" loadmodule "/usr/local/lib/ser/modules/textops.so" # #loadmodule "/usr/local/lib/ser/modules/nathelper.so" #loadmodule "/usr/local/lib/ser/modules/uri.so" #loadmodule "/usr/local/lib/ser/modules/group.so" # # Uncomment this if you want digest authentication # mysql.so must be loaded ! loadmodule "/usr/local/lib/ser/modules/auth.so" loadmodule "/usr/local/lib/ser/modules/auth_db.so" # # ----------------- setting module-specific parameters --------------- # # -- usrloc params -- # #modparam("usrloc", "db_mode", 0) # # Uncomment this if you want to use SQL database # for persistent storage and comment the previous line modparam("usrloc", "db_mode", 2) # # -- auth params -- # Uncomment if you are using auth module # modparam("auth_db", "calculate_ha1", yes) # # If you set "calculate_ha1" parameter to yes (which true in this config), # uncomment also the following parameter) # modparam("auth_db", "password_column", "password") # # modparam("acc", "log_level", 1) modparam("acc", "log_flag", 2) modparam("acc", "log_missed_flag", 2) modparam("acc", "log_fmt", "fimos") # #modparam("tm", "fr_inv_timer", 15) #INVITE timeout #modparam("tm", "fr_timer", 5) #negative INVITE reply or no #final reply for a request for ACK # modparam("voicemail", "db_url", "sql://ser:heslo@localhost/ser") # #modparam("acc", "db_url", "sql://ser:heslo@localhost/ser") #modparam("acc", "db_flag", 2) #modparam("acc", "db_missed_flag", 2) # # ------------------------- request routing logic ------------------- # # main routing logic # alias=10.10.10.49 #sip server IP address alias=jiffypop #sip server name alias=mydomain.com #sip domain/realm alias=jiffypop.mydomain.com #sip server FQDN # route{ log(1,"entering main route"); #prevent strangers from claiming to belong to our domain; #if sender claims to be in our domain in From header field, #better authenticate him # code not inserted yet :)
# initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; };
# we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol record_route(); # loose-route processing if (loose_route()) { t_relay(); break; }; setflag(2); #set flag for accounting # if the request is for other domain use UsrLoc # (in case it does not work, use the following command # with proper names and addresses in it)
if (uri==myself) { if (method=="REGISTER") { # digest authentication log(1,"request for registration"); if (!www_authorize("mydomain.com", "subscriber")) { www_challenge("mydomain.com", "0"); break; }; save("location"); break; };
/* ********** Dial out to PSTN logic ************* */
#forward numerical 7 digit requests to gateway if(uri=~"^sip:[0-9]{7}@(mydomain.com|10.10.10.49)"){ rewritehostport("10.10.10.5:5060"); log(1,"7 digit expression match"); route(2); break;
}; # strip 650 and forward to GW if user dials 650 before phone no. if(uri=~"^sip:650[0-9]{7}@(mydomain.com|10.10.10.49)"){ strip(3); rewritehostport("10.10.10.5:5060"); log(1,"650 area code dialed, 650 stripped"); route(2); break; }; #forward numerical 10 digit requests to gateway, append a 1 first if(uri=~"^sip:[0-9]{10}@(mydomain.com|10.10.10.49)"){ prefix("1"); rewritehostport("10.10.10.5:5060"); log(1,"10 digit expression match, prefix 1"); route(2); break; }; #forward numerical 11 digit requests that start with a 1 to GW if(uri=~"^sip:1[0-9]{10}@(mydomain.com|10.10.10.49)"){ rewritehostport("10.10.10.5:5060"); log(1,"10 digit exp match w/leading 1"); route(2); break; }; #forward international N digit requests to gateway if(uri=~"^sip:011[0-9]+@(mydomain.com|10.10.10.49)"){ rewritehostport("10.10.10.5:5060"); log(1,"international expression match"); route(2); break; };
/* ********** VOICEMAIL logic ************* */
if (uri=~"^sip:voicemail+@"){ log(1,"sip:voicemail uri match"); route(3); break; };
/* ****** Find Aliases and Locations of users ********* */ # It is very important to lookup "aliases" before looking up "locations"
if(!lookup("aliases")){ log(1,"Couldn't find any matching alias"); sl_send_reply("404", "User does not exist"); break; }; if(!lookup("location")) { log(1,"unable to locate user"); route(3); break; };
};
# forward to current uri now; use stateful forwarding; that # works reliably even if we forward from TCP to UDP log(1,"routing at eof: should not occur for outgoing PSTN calls"); t_on_failure("1"); if (!t_relay()) { sl_reply_error(); }; log(1,"eof"); }
route[2]{ log(1,"route[2]:SIP-to-PSTN call routed"); if(!t_relay()){ sl_reply_error(); }; }
route[3]{ log(1,"route[3]: voicemail processing"); if(method=="ACK" || method=="INVITE" || method=="BYE" || method=="REFER"){ log(1,"1st if entered in route[3] *vm*"); if(t_newtran()){ t_reply("100","Trying -- just a second"); if(method=="INVITE" || method=="REFER"){ log(1,"route[3]:method==INVITE || REFER"); if(uri =~ "conference" ){ if(!vm("/tmp/am_fifo","conference")){ log(1,"could not contact conference server"); t_reply("500","could not contact conference server"); }; } else if (uri =~"echo"){ if(!vm("/tmp/am_fifo","echo")){ log(1,"could not contact echo"); t_reply("500","could not contact echo"); }; } else{ if(!vm("/tmp/am_fifo","voicemail")){ log(1,"vm module called and failed"); t_reply("500", "voicemail error"); }; }; break; }; if(method=="BYE"){ log(1,"vm end/refer - begin"); if(!vm("/tmp/am_fifo","bye")){ log(1,"could not contact the media server"); t_reply("500" , "could not contact the media server"); }; break; }; } else{ log(1,"route[3]:could not create new transaction"); sl_send_reply("500", "could not create new transaction"); }; log(1,"route[3]:end of first method== check"); };
}
failure_route[1]{ log(1,"failure_route[1]:jump to vm: route[3]"); route(3); }
interface: eth0 (10.10.10.0/255.255.255.0) match: 5060 ### U 10.10.10.5:53667 -> 10.10.10.49:5060 INVITE sip:6609@10.10.10.49:5060 SIP/2.0..Via: SIP/2.0/UDP 10.10.10.5:5060..From: <sip:6502188884@10.10.10. 5>;tag=4CCDE44-B57..To: sip:6609@10.10.10.49..Date: Mon, 01 Mar 1993 22:22:15 GMT..Call-ID: A74AE3D-15AA11 CC-8071812E-8BB375E1@10.10.10.5..Supported: timer,100rel..Min-SE: 1800..Cisco-Guid: 175259037-363467212-215 4725678-2343794145..User-Agent: Cisco-SIPGateway/IOS-12.x..Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO..CSeq: 101 INVITE..Max-Forwards: 6..Remote-Party-ID: <sip:6502188884@1 0.10.10.5>;party=calling;screen=yes;privacy=off..Timestamp: 731024535..Contact: <sip:6502188884@10.10.10.5:5 060>..Expires: 180..Allow-Events: telephone-event..Content-Type: application/sdp..Content-Length: 185....v=0 ..o=CiscoSystemsSIP-GW-UserAgent 6694 6444 IN IP4 10.10.10.5..s=SIP Call..c=IN IP4 10.10.10.5..t=0 0..m=audi o 18640 RTP/AVP 0..c=IN IP4 10.10.10.5..a=rtpmap:0 PCMU/8000..a=ptime:20.. # U 10.10.10.49:5060 -> 10.10.10.5:5060 SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP 10.10.10.5:5060..From: <sip:6502188884 @10.10.10.5>;tag=4CCDE44-B57..To: sip:6609@10.10.10.49..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10. 10.5..CSeq: 101 INVITE..Server: Sip EXpress router (0.8.11 (i386/linux))..Content-Length: 0.... # U 10.10.10.49:5060 -> 10.10.10.189:5060 INVITE sip:esavelle@10.10.10.189 SIP/2.0..Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..Via: SIP /2.0/UDP 10.10.10.49;branch=z9hG4bKaa33.8c7a9b23.0..Via: SIP/2.0/UDP 10.10.10.5:5060..From: <sip:6502188884 @10.10.10.5>;tag=4CCDE44-B57..To: sip:6609@10.10.10.49..Date: Mon, 01 Mar 1993 22:22:15 GMT..Call-ID: A74A E3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..Supported: timer,100rel..Min-SE: 1800..Cisco-Guid: 175259037-363 467212-2154725678-2343794145..User-Agent: Cisco-SIPGateway/IOS-12.x..Allow: INVITE, OPTIONS, BYE, CANCEL, AC K, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO..CSeq: 101 INVITE..Max-Forwards: 5..Remote-Party-ID: <sip:65 02188884@10.10.10.5>;party=calling;screen=yes;privacy=off..Timestamp: 731024535..Contact: <sip:6502188884@10 .10.10.5:5060>..Expires: 180..Allow-Events: telephone-event..Content-Type: application/sdp..Content-Length: 185....v=0..o=CiscoSystemsSIP-GW-UserAgent 6694 6444 IN IP4 10.10.10.5..s=SIP Call..c=IN IP4 10.10.10.5..t=0 0..m=audio 18640 RTP/AVP 0..c=IN IP4 10.10.10.5..a=rtpmap:0 PCMU/8000..a=ptime:20.. # U 10.10.10.189:5060 -> 10.10.10.49:5060 SIP/2.0 100 trying..Via: SIP/2.0/UDP 10.10.10.49;branch=z9hG4bKaa33.8c7a9b23.0..Via: SIP/2.0/UDP 10.10.10.5 :5060..Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..From: sip:6502188884@10.10.10.5;tag=4CCDE 44-B57..To: sip:6609@10.10.10.49..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..CSeq: 101 INVITE ..User-Agent: Grandstream SIP UA 1.0.3.81..Content-Length: 0.... # U 10.10.10.189:5060 -> 10.10.10.49:5060 SIP/2.0 486 ..Via: SIP/2.0/UDP 10.10.10.49;branch=z9hG4bKaa33.8c7a9b23.0..Via: SIP/2.0/UDP 10.10.10.5:5060. .Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..From: sip:6502188884@10.10.10.5;tag=4CCDE44-B57 ..To: sip:6609@10.10.10.49;tag=c02cab98-902a-cad0-7e53-08924feebae5..Call-ID: A74AE3D-15AA11CC-8071812E-8B B375E1@10.10.10.5..CSeq: 101 INVITE..User-Agent: Grandstream SIP UA 1.0.3.81..Content-Length: 0.... ## U 10.10.10.49:5060 -> 10.10.10.5:5060 SIP/2.0 500 could not create new transaction..Via: SIP/2.0/UDP 10.10.10.5:5060..From: <sip:6502188884@10.10 .10.5>;tag=4CCDE44-B57..To: sip:6609@10.10.10.49;tag=b27e1a1d33761e85846fc98f5f3a7e58.c9a7..Call-ID: A74AE 3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..CSeq: 101 INVITE..Server: Sip EXpress router (0.8.11 (i386/linux)) ..Content-Length: 0.... # U 10.10.10.49:5060 -> 10.10.10.5:5060 SIP/2.0 486 ..Via: SIP/2.0/UDP 10.10.10.5:5060..Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..F rom: sip:6502188884@10.10.10.5;tag=4CCDE44-B57..To: sip:6609@10.10.10.49;tag=c02cab98-902a-cad0-7e53-089 24feebae5..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..CSeq: 101 INVITE..User-Agent: Grandstream SIP UA 1.0.3.81..Content-Length: 0.... # U 10.10.10.49:5060 -> 10.10.10.5:5060 SIP/2.0 486 ..Via: SIP/2.0/UDP 10.10.10.5:5060..Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..F rom: sip:6502188884@10.10.10.5;tag=4CCDE44-B57..To: sip:6609@10.10.10.49;tag=c02cab98-902a-cad0-7e53-089 24feebae5..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..CSeq: 101 INVITE..User-Agent: Grandstream SIP UA 1.0.3.81..Content-Length: 0.... # U 10.10.10.5:53667 -> 10.10.10.49:5060 ACK sip:6609@10.10.10.49:5060 SIP/2.0..Via: SIP/2.0/UDP 10.10.10.5:5060..From: sip:6502188884@10.10.10.5; tag=4CCDE44-B57..To: sip:6609@10.10.10.49;tag=b27e1a1d33761e85846fc98f5f3a7e58.c9a7..Date: Mon, 01 Mar 199 3 22:22:15 GMT..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..Max-Forwards: 6..Content-Length: 0.. CSeq: 101 ACK.... # U 10.10.10.49:5060 -> 10.10.10.5:5060 SIP/2.0 486 ..Via: SIP/2.0/UDP 10.10.10.5:5060..Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..F rom: sip:6502188884@10.10.10.5;tag=4CCDE44-B57..To: sip:6609@10.10.10.49;tag=c02cab98-902a-cad0-7e53-089 24feebae5..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..CSeq: 101 INVITE..User-Agent: Grandstream SIP UA 1.0.3.81..Content-Length: 0.... ### U 10.10.10.49:5060 -> 10.10.10.5:5060 SIP/2.0 486 ..Via: SIP/2.0/UDP 10.10.10.5:5060..Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..F rom: sip:6502188884@10.10.10.5;tag=4CCDE44-B57..To: sip:6609@10.10.10.49;tag=c02cab98-902a-cad0-7e53-089 24feebae5..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..CSeq: 101 INVITE..User-Agent: Grandstream SIP UA 1.0.3.81..Content-Length: 0.... ##### U 10.10.10.49:5060 -> 10.10.10.5:5060 SIP/2.0 486 ..Via: SIP/2.0/UDP 10.10.10.5:5060..Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..F rom: sip:6502188884@10.10.10.5;tag=4CCDE44-B57..To: sip:6609@10.10.10.49;tag=c02cab98-902a-cad0-7e53-089 24feebae5..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..CSeq: 101 INVITE..User-Agent: Grandstream SIP UA 1.0.3.81..Content-Length: 0.... ########### U 10.10.10.49:5060 -> 10.10.10.5:5060 SIP/2.0 486 ..Via: SIP/2.0/UDP 10.10.10.5:5060..Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..F rom: sip:6502188884@10.10.10.5;tag=4CCDE44-B57..To: sip:6609@10.10.10.49;tag=c02cab98-902a-cad0-7e53-089 24feebae5..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..CSeq: 101 INVITE..User-Agent: Grandstream SIP UA 1.0.3.81..Content-Length: 0.... ########### U 10.10.10.49:5060 -> 10.10.10.5:5060 SIP/2.0 486 ..Via: SIP/2.0/UDP 10.10.10.5:5060..Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..F rom: sip:6502188884@10.10.10.5;tag=4CCDE44-B57..To: sip:6609@10.10.10.49;tag=c02cab98-902a-cad0-7e53-089 24feebae5..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..CSeq: 101 INVITE..User-Agent: Grandstream SIP UA 1.0.3.81..Content-Length: 0.... ######## U 10.10.10.49:5060 -> 10.10.10.5:5060 SIP/2.0 486 ..Via: SIP/2.0/UDP 10.10.10.5:5060..Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..F rom: sip:6502188884@10.10.10.5;tag=4CCDE44-B57..To: sip:6609@10.10.10.49;tag=c02cab98-902a-cad0-7e53-089 24feebae5..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..CSeq: 101 INVITE..User-Agent: Grandstream SIP UA 1.0.3.81..Content-Length: 0.... ###### U 10.10.10.49:5060 -> 10.10.10.5:5060 SIP/2.0 486 ..Via: SIP/2.0/UDP 10.10.10.5:5060..Record-Route: sip:6609@10.10.10.49;ftag=4CCDE44-B57;lr..F rom: sip:6502188884@10.10.10.5;tag=4CCDE44-B57..To: sip:6609@10.10.10.49;tag=c02cab98-902a-cad0-7e53-089 24feebae5..Call-ID: A74AE3D-15AA11CC-8071812E-8BB375E1@10.10.10.5..CSeq: 101 INVITE..User-Agent: Grandstream SIP UA 1.0.3.81..Content-Length: 0.... ############################exit