Below is a call flow for a situation that fails - I have attached the ser.cfg file, and two ethereal sniffs - these are for fax call attempts - one with record_route commented out (which succeeds) , and one with record_route(), which fails. Note that in the failure case, with record_route(), the re-invite from 208.226.140.40 gets to the proxy at 208.226.140.141, but the proxy never sends that to the origination UA, 208.226.140.142.
The fax case looks nearly identical to the call flow below, which was taken from a call attempt with a SIP phone placed on hold.
From TRT -- We are having a problem with a Re-Invite between and endpoint and the SER proxy. The call flow is:
Assumptions: Record route turned on in Proxy
UA-Orig Proxy UA-Term
192.168.1.10 192.168.1.20 192.168.1.30
------------------Invite sip:1@192.168.1.20------->
<--------------- 100 Trying ----------------------------
-------- Invite sip:1@192.168.1.30 --------->
<-------------- 100 Trying --------------------
<------------------180 Ringing ----------------
<---------------- 180 Ringing -------------------------
<------------------ 200 OK ---------------------
<---------------- 200 OK-------------------------------
--------------------- ACK sip:1@192.168.1.20 à
--------- Ack sip:1@192.168.1.30 ------>
******** Call is connected and voice path is established *************************
******** Termination puts call on hold and sends NULL SDP via Re-Invite ******
<-------- Invite sip:1@192.168.1.20-------
** Note: to and from tags are set correctly, call id is same as original Invite, Sequence incremented
---------- 100 Trying ------------------------->
---------- Invite sip:1@192.168.1.30 -------->
** Invite is being sent back to termination. It is not identifying this call as an existing call in the proxy.
TRT
The re-INVITE looks correct to me. Add logging info like log(1,"Message enters main route...); to your routing script andwatch the logging output in syslog. On some point the INVITE message must be lost.
You should also add a loose_route() block to your ser.cfg
klaus
bert berlin wrote:
Below is a call flow for a situation that fails - I have attached the ser.cfg file, and two ethereal sniffs - these are for fax call attempts - one with record_route commented out (which succeeds) , and one with record_route(), which fails. Note that in the failure case, with record_route(), the re-invite from 208.226.140.40 gets to the proxy at 208.226.140.141, but the proxy never sends that to the origination UA, 208.226.140.142.
The fax case looks nearly identical to the call flow below, which was taken from a call attempt with a SIP phone placed on hold.
From TRT -- We are having a problem with a Re-Invite between and endpoint and the SER proxy. The call flow is:
Assumptions: Record route turned on in Proxy
UA-Orig Proxy UA-Term
192.168.1.10 192.168.1.20 192.168.1.30
------------------Invite sip:1@192.168.1.20------->
<--------------- 100 Trying ----------------------------
--------
Invite sip:1@192.168.1.30 --------->
<-------------- 100 Trying --------------------
<------------------180 Ringing ----------------
<---------------- 180 Ringing -------------------------
<------------------ 200 OK ---------------------
<---------------- 200 OK-------------------------------
--------------------- ACK sip:1@192.168.1.20 à
---------
Ack sip:1@192.168.1.30 ------>
******** Call is connected and voice path is established
******** Termination puts call on hold and sends NULL SDP via Re-Invite
<--------
Invite sip:1@192.168.1.20-------
** Note: to and from tags are set correctly, call id is same as original Invite, Sequence incremented
----------
100 Trying ------------------------->
----------
Invite sip:1@192.168.1.30 -------->
** Invite is being sent back to termination. It is not identifying this call as an existing call in the proxy.
TRT
# # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $ # # simple quick-start config script # Uses proxy registrar to route call, so won't work unless UA is registered. #
# ----------- global configuration parameters ------------------------
debug=8 # debug level (cmd line: -dddddddddd) fork=yes log_stderror=yes # (cmd line: -E)
/* Uncomment these lines to enter debugging mode */ fifo="/tmp/ser_fifo" sip_warning=yes
check_via=yes # (cmd. line: -v) dns=yes # (cmd. line: -r) rev_dns=yes # (cmd. line: -R) listen=208.226.140.141 port=5060 listen=208.226.140.141 port=5000 listen=208.226.140.141 port=5061 listen=208.226.140.141 port=6000 children=4 fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so" loadmodule "/usr/lib/ser/modules/tm.so" loadmodule "/usr/lib/ser/modules/rr.so" loadmodule "/usr/lib/ser/modules/maxfwd.so" loadmodule "/usr/lib/ser/modules/usrloc.so" loadmodule "/usr/lib/ser/modules/registrar.so"
# Uncomment this if you want digest authentication # mysql.so must be loaded ! loadmodule "/usr/lib/ser/modules/auth.so" loadmodule "/usr/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")
# -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1) modparam("registrar", "default_expires", 120) #sets default for expiry if registrant doesn't specify modparam("registrar", "default_q", 1000)# sets default q value in registration # ------------------------- request routing logic ------------------- alias=quintum.com alias=208.226.140.141 alias=208.226.140.41 alias=engweb@quintum.com alias=208.226.140.141@quintum.com alias=208.226.140.41@quintum.com
# main routing logic
route{
# 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 ( msg:len > max_len ) { sl_send_reply("513", "Message too big"); break; };
############################################
# store user location if a REGISTER appears if (method=="REGISTER") { save("location"); break; };
if (uri==myself) #where myself is defined by the aliases above { #look for the registered contact in the location table of database #and if find it, rewrite the uri and forward statefully to the destination if (lookup ("location"))##Lookup finds the contact info and rewrites the header { record_route();#send everything back through the proxy t_relay(); break; } else { sl_send_reply("404","user not found");#and if you really don't know what to do, send this back break; } };
}
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
On Jul 06, 2004 at 18:14, bert berlin btberlin@quintum.com wrote:
Below is a call flow for a situation that fails - I have attached the ser.cfg file, and two ethereal sniffs - these are for fax call attempts - one with record_route commented out (which succeeds) , and one with record_route(), which fails. Note that in the failure case, with record_route(), the re-invite from 208.226.140.40 gets to the proxy at 208.226.140.141, but the proxy never sends that to the origination UA, 208.226.140.142.
There are several errors.
[...]
route{
# 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 ( msg:len > max_len ) { sl_send_reply("513", "Message too big"); break; };
Add a loose route block here. If you don't your messages won't be properly routed. See etc/ser.cfg for a good basic config example.
if (loose_route()) { t_relay(); break; };
############################################
# store user location if a REGISTER appears if (method=="REGISTER") { save("location"); break; };
The above stuff should be under if (uri==myself) or you will catch all the registers (even if they are not for your proxy). OTOH this won't affect your test.
if (uri==myself) #where myself is defined by the aliases above { #look for the registered contact in the location table of database #and if find it, rewrite the uri and forward statefully to the destination if (lookup ("location"))##Lookup finds the contact info and rewrites the header { record_route();#send everything back through the proxy t_relay(); break; } else { sl_send_reply("404","user not found");#and if you really don't know what to do, send this back break; } };
Here you are dropping all the packets (you don't forward them and you've reached the end of your config). So if a packet doesn't match uri==myself it will get dropped. This happens to your re-INVITEs. Add here a t_relay() or forward(uri:host, uri:port).
}
Also note that your UA1 (.142) sends the ACK directly to UA2(.40) and not through the proxy. See packet 15 in sip-fax-with-record-route-7-6-04.
Andrei