Hi,
I have a basic sip question. What's the correct r-uri for ACK? I use stateful forwarding, so all SIP messages pass through ser. I have seen two types of UA. Some use the contact field of 200 OK response as the r-uri and other use the original r-uri for INVITE.
Is it a SIP violation to use the original r-uri of INVITE? The problem here is that if there is a parallel forking for the INVITE, it might be sent to places other than the real callee.
Any comment?
Thanks, Richard
It depends. ACK for negative replies must have identical URIs as INVITEs. Otherwise, it is dicated by record-routing. Loose routers (i.e., those that implement RFC3261 as opposed to the obsoleted RFC2543) put peer's contact in there, which is ideal. Strict routers put record-routing information there. This alternative is valid in terms of an obsoleted spec.
-jiri
At 11:02 AM 10/14/2004, Richard wrote:
Hi,
I have a basic sip question. What�s the correct r-uri for ACK? I use stateful forwarding, so all SIP messages pass through ser. I have seen two types of UA. Some use the contact field of 200 OK response as the r-uri and other use the original r-uri for INVITE.
Is it a SIP violation to use the original r-uri of INVITE? The problem here is that if there is a parallel forking for the INVITE, it might be sent to places other than the real callee.
Any comment?
Thanks,
Richard _______________________________________________ Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-- Jiri Kuthan http://iptel.org/~jiri/
Hi Jiri,
If I have record-route, ACK to a 200 OK should be forwarded loose route. But for an ACK to negative reply, e.g. 487, it uses the original r-uri. Because ACK to negative reply is hop-by-hop basis, ser should absorb the ACK and won't forward it further, right? In ser.cfg, should we just drop it in case ser doesn't absorb it? Downstream won't understand the ACK anyway and might be screw up any existing call...
Richard
-----Original Message----- From: Jiri Kuthan [mailto:jiri@iptel.org] Sent: Thursday, October 14, 2004 12:33 AM To: Richard; serusers@lists.iptel.org Subject: Re: [Serusers] r-uri for ACK
It depends. ACK for negative replies must have identical URIs as INVITEs. Otherwise, it is dicated by record-routing. Loose routers (i.e., those that implement RFC3261 as opposed to the obsoleted RFC2543) put peer's contact in there, which is ideal. Strict routers put record-routing information there. This alternative is valid in terms of an obsoleted spec.
-jiri
At 11:02 AM 10/14/2004, Richard wrote:
Hi,
I have a basic sip question. Whats the correct r-uri for ACK? I use
stateful forwarding, so all SIP messages pass through ser. I have seen two types of UA. Some use the contact field of 200 OK response as the r-uri and other use the original r-uri for INVITE.
Is it a SIP violation to use the original r-uri of INVITE? The problem
here is that if there is a parallel forking for the INVITE, it might be sent to places other than the real callee.
Any comment?
Thanks,
Richard _______________________________________________ Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-- Jiri Kuthan http://iptel.org/~jiri/
At 04:39 AM 10/18/2004, Richard wrote:
Hi Jiri,
If I have record-route, ACK to a 200 OK should be forwarded loose route. But for an ACK to negative reply, e.g. 487, it uses the original r-uri.
sure
Because ACK to negative reply is hop-by-hop basis, ser should absorb the ACK and won't forward it further, right?
indeed
In ser.cfg, should we just drop it in case ser doesn't absorb it?
SER absorbs it either in t_relay if the reply was generated statefully or even before enterint the script if reply was generated statellsy.
-jiri
Downstream won't understand the ACK anyway and might be screw up any existing call...
Richard
-----Original Message----- From: Jiri Kuthan [mailto:jiri@iptel.org] Sent: Thursday, October 14, 2004 12:33 AM To: Richard; serusers@lists.iptel.org Subject: Re: [Serusers] r-uri for ACK
It depends. ACK for negative replies must have identical URIs as INVITEs. Otherwise, it is dicated by record-routing. Loose routers (i.e., those that implement RFC3261 as opposed to the obsoleted RFC2543) put peer's contact in there, which is ideal. Strict routers put record-routing information there. This alternative is valid in terms of an obsoleted spec.
-jiri
At 11:02 AM 10/14/2004, Richard wrote:
Hi,
I have a basic sip question. Whats the correct r-uri for ACK? I use
stateful forwarding, so all SIP messages pass through ser. I have seen two types of UA. Some use the contact field of 200 OK response as the r-uri and other use the original r-uri for INVITE.
Is it a SIP violation to use the original r-uri of INVITE? The problem
here is that if there is a parallel forking for the INVITE, it might be sent to places other than the real callee.
Any comment?
Thanks,
Richard _______________________________________________ Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-- Jiri Kuthan http://iptel.org/~jiri/
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-- Jiri Kuthan http://iptel.org/~jiri/
The problem I ran into is illustrated in another email thread. Somehow a 487 is forwarded upstream to the original caller. And it replies with an ACK which ser won't match any transaction and thus not absorbed. Can you please look at my other email with a subject "cancel and 487 relay" sent out earlier today?
Thanks, Richard
In ser.cfg, should we just drop it in case ser doesn't absorb it?
SER absorbs it either in t_relay if the reply was generated statefully or even before enterint the script if reply was generated statellsy.
-jiri
I am a beginner and just set a SER server, the SER server looks working fine, the SIP-communicator can register it. The SER Version is 08-12-0.
But when I tried to load the pa module, there is always a problem:
I have set the following modparams in my ser.cfg:
loadmodule "/usr/lib/ser/modules/pa.so" .....
modparam("pa", "default_expires", 60) modparam("pa", "pa_domain","rocksteady.cs.fiu.edu") modparam("pa", "use_db", 1) modparam("pa", "db_url", "mysql://ser:heslo@localhost/ser")
The ser always failed at modparam("pa", "pa_domain","rocksteady.cs.fiu.edu").
Have I missed something? Could anybody help me how to find document about Pa module? how to load pa module at ser.cfg? I have done a lot search, but the documentation is really hard to find.
Thanks a lot
Xudong
I am moving to SER from Asterisk for the radius auth and accounting.
I finally made SER register and authenticate my test endpoint (Cisco ATA 186) :D i can dial to my home phone and my regular phone rings... but when i pick up i have dialtone... i'm pasting SER's output and my ser.cfg below. A codec problem? My carrier is using G729.
I am moving to SER from asterisk... on asterisk i can place callls from this same ATA box trough my carrier. Does SER care what the Codec is ?
Thanks in advance,
Carlos Maynard Jr.
ser.cfg: -------- listen=66.118.238.201
debug=9 fork=no log_stderror=no
check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) fifo="/tmp/ser_fifo"
loadmodule "/usr/local/lib/ser/modules/mysql.so" loadmodule "/usr/local/lib/ser/modules/auth_radius.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"
modparam("usrloc", "db_mode", 0)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password") modparam("auth_db", "db_url", "mysql://ser:heslo@66.118.238.198/ser") modparam("auth_radius", "radius_config","/usr/local/etc/radiusclient/radiusclient.conf")
modparam("rr", "enable_full_lr", 1)
route{
log(1, "\n**********************ROUTING\n");
# 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; };
record_route();
if (loose_route()) { log(1, "\n**********************LOOSE ROUTE\n"); t_relay(); break; };
if (uri==myself) { log(1, "\n**********************MYSELF\n");
if (method=="REGISTER") { log(1, "REGISTER: Authenticating user\n");
if (!radius_www_authorize("")) { log(1, "REGISTER: challenging user\n"); www_challenge("", "0"); break; };
save("location"); break; };
if (method=="INVITE") { log(1, "INVITE\n"); setflag(1); /* set for accounting (the same value as in log_flag!) */ };
if (method=="MESSAGE") { log(1, "MESSAGE\n"); setflag(1); /* set for accounting (the same value as in log_flag!) */ };
if (method=="BYE" || method=="CANCEL") { log (1, "BYE or CANCEL\n"); setflag(1); };
# IF HOST IS JUST NUMBERS SEND TO route(3) FOR E.164 PROCESSING if (uri =~ "^sip:[0-9]*@"){ log(1, "SER: matched ^sip:[0-9]*@ - just numbers - process in route(3)\n"); route(3); break; };
} } route[3] {
if (uri=~"^sip:[0-9]*@") { log(1, "SER: matched ^sip:6126[1,2] - forward to GW in CANBERRA\n"); rewritehostport("38.114.15.34:5060"); t_relay_to_udp("38.114.15.34","5060"); break; };
}
Console Output: -----------------
0(13481) SIP Request: 0(13481) method: <INVITE> 0(13481) uri: sip:12814192614@66.118.238.201;user=phone 0(13481) version: <SIP/2.0> 0(13481) parse_headers: flags=1 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=1 0(13481) parse_headers: this is the first via 0(13481) After parse_msg... 0(13481) preparing to run routing scripts... 0(13481) **********************ROUTING 0(13481) DEBUG : is_maxfwd_present: searching for max_forwards header 0(13481) parse_headers: flags=128 0(13481) end of header reached, state=9 0(13481) DEBUG: get_hdr_field: <To> [45]; uri=[sip:12814192614@66.118.238.201;user=phone] 0(13481) DEBUG: to body [sip:12814192614@66.118.238.201;user=phone ] 0(13481) get_hdr_field: cseq <CSeq>: <1> <INVITE> 0(13481) DEBUG: get_hdr_body : content_length=268 0(13481) found end of header 0(13481) DEBUG: is_maxfwd_present: max_forwards header not found! 0(13481) DEBUG: add_param: tag=119525115 0(13481) end of header reached, state=29 0(13481) parse_headers: flags=256 0(13481) find_first_route(): No Route headers found 0(13481) loose_route(): There is no Route HF 0(13481) check_self - checking if host==us: 14==14 && [66.118.238.201] == [66.118.238.201] 0(13481) check_self - checking if port 5060 matches port 5060 0(13481) **********************MYSELF 0(13481) INVITE 0(13481) SER: matched ^sip:[0-9]*@ - just numbers - process in route(3) 0(13481) SER: matched ^sip:6126[1,2] - forward to GW in CANBERRA 0(13481) DEBUG: t_addifnew: msg id=121 , global msg id=120 , T on entrance=0xffffffff 0(13481) parse_headers: flags=-1 0(13481) parse_headers: flags=60 0(13481) t_lookup_request: start searching: hash=30407, isACK=0 0(13481) DEBUG: proceeding to pre-RFC3261 transaction matching 0(13481) DEBUG: t_lookup_request: no transaction found 0(13481) SER: new INVITE 0(13481) parse_headers: flags=-1 0(13481) check_via_address(68.91.112.229, 192.168.1.4, 0) 0(13481) WARNING:vqm_resize: resize(0) called 0(13481) DEBUG: reply sent out. buf=0x80c5f20: SIP/2.0 1..., shmem=0x402e4040: SIP/2.0 1 0(13481) DEBUG: t_reply: finished 0(13481) check_via_address(68.91.112.229, 192.168.1.4, 0) 0(13481) DEBUG: add_to_tail_of_timer[4]: 0x402e4f30 0(13481) DEBUG: add_to_tail_of_timer[0]: 0x402e4f44 0(13481) SER: new transaction fwd'ed 0(13481) DEBUG:destroy_avp_list: destroing list (nil) 0(13481) receive_msg: cleaning up 0(13481) SIP Reply (status): 0(13481) version: <SIP/2.0> 0(13481) status: <100> 0(13481) reason: <Trying> 0(13481) parse_headers: flags=1 0(13481) Found param type 232, <branch> = <z9hG4bK7c67.dc0712e3.0>; state=16 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=1 0(13481) parse_headers: this is the first via 0(13481) After parse_msg... 0(13481) forward_reply: found module tm, passing reply to it 0(13481) DEBUG: t_check: msg id=122 global id=121 T start=0xffffffff 0(13481) parse_headers: flags=17 0(13481) Found param type 234, <received> = <192.168.1.4>; state=16 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=17 0(13481) parse_headers: this is the second via 0(13481) end of header reached, state=9 0(13481) DEBUG: get_hdr_field: <To> [45]; uri=[sip:12814192614@66.118.238.201;user=phone] 0(13481) DEBUG: to body [sip:12814192614@66.118.238.201;user=phone ] 0(13481) get_hdr_field: cseq <CSeq>: <1> <INVITE> 0(13481) parse_headers: flags=4 0(13481) DEBUG: t_reply_matching: hash 30407 label 1042378957 branch 0 0(13481) DEBUG: t_reply_matching: reply matched (T=0x402e4e08)! 0(13481) DEBUG: t_check: msg id=122 global id=122 T end=0x402e4e08 0(13481) DEBUG: t_on_reply: org. status uas=100, uac[0]=0 local=0 is_invite=1) 0(13481) ->>>>>>>>> T_code=100, new_code=100 0(13481) DEBUG: relay_reply: branch=0, save=0, relay=-1 0(13481) DEBUG: add_to_tail_of_timer[1]: 0x402e4f44 0(13481) DEBUG:destroy_avp_list: destroing list (nil) 0(13481) receive_msg: cleaning up 1(13482) DEBUG: timer routine:4,tl=0x402e4f30 next=(nil) 0(13481) SIP Reply (status): 0(13481) version: <SIP/2.0> 0(13481) status: <180> 0(13481) reason: <Ringing> 0(13481) parse_headers: flags=1 0(13481) Found param type 232, <branch> = <z9hG4bK7c67.dc0712e3.0>; state=16 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=1 0(13481) parse_headers: this is the first via 0(13481) After parse_msg... 0(13481) forward_reply: found module tm, passing reply to it 0(13481) DEBUG: t_check: msg id=123 global id=122 T start=0xffffffff 0(13481) parse_headers: flags=17 0(13481) Found param type 234, <received> = <192.168.1.4>; state=16 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=17 0(13481) parse_headers: this is the second via 0(13481) DEBUG: add_param: tag=SD40lb399-38 0(13481) end of header reached, state=29 0(13481) DEBUG: get_hdr_field: <To> [62]; uri=[sip:12814192614@66.118.238.201;user=phone] 0(13481) DEBUG: to body [sip:12814192614@66.118.238.201;user=phone] 0(13481) get_hdr_field: cseq <CSeq>: <1> <INVITE> 0(13481) parse_headers: flags=4 0(13481) DEBUG: t_reply_matching: hash 30407 label 1042378957 branch 0 0(13481) DEBUG: t_reply_matching: reply matched (T=0x402e4e08)! 0(13481) DEBUG: t_check: msg id=123 global id=123 T end=0x402e4e08 0(13481) DEBUG: t_on_reply: org. status uas=100, uac[0]=100 local=0 is_invite=1) 0(13481) ->>>>>>>>> T_code=100, new_code=180 0(13481) DEBUG: relay_reply: branch=0, save=0, relay=0 0(13481) old size: 669, new size: 606 0(13481) build_res_from_sip_res: copied size: orig:84, new: 21, rest: 585 msg= SIP/2.0 180 Ringing Via: SIP/2.0/UDP 192.168.1.4:5060;received=192.168.1.4 From: Line 0 sip:2000@66.118.238.201;user=phone;tag=119525115 To: sip:12814192614@66.118.238.201;user=phone;tag=SD40lb399-38 Call-ID: 2912392921@68.91.112.229 CSeq: 1 INVITE Record-Route: sip:12814192614@66.118.238.201;ftag=119525115;lr=on Content-Length: 176 Content-Disposition: session;handling=required Content-Type: application/sdp
v=0 o=Sonus_UAC 22631 32400 IN IP4 38.114.15.34 s=SIP Media Capabilities c=IN IP4 38.114.15.34 t=0 0 m=audio 6220 RTP/AVP 18 a=fmtp:18 annexb:no a=sendrecv a=ptime:20
0(13481) DEBUG: reply relayed. buf=0x80c67b0: SIP/2.0 1..., shmem=0x402e6840: SIP/2.0 1 0(13481) DEBUG: add_to_tail_of_timer[1]: 0x402e4f44 0(13481) DEBUG:destroy_avp_list: destroing list (nil) 0(13481) receive_msg: cleaning up
0(13481) SIP Request: 0(13481) method: <CANCEL> 0(13481) uri: sip:12814192614@66.118.238.201;user=phone 0(13481) version: <SIP/2.0> 0(13481) parse_headers: flags=1 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=1 0(13481) parse_headers: this is the first via 0(13481) After parse_msg... 0(13481) preparing to run routing scripts... 0(13481) **********************ROUTING 0(13481) DEBUG : is_maxfwd_present: searching for max_forwards header 0(13481) parse_headers: flags=128 0(13481) end of header reached, state=9 0(13481) DEBUG: get_hdr_field: <To> [45]; uri=[sip:12814192614@66.118.238.201;user=phone] 0(13481) DEBUG: to body [sip:12814192614@66.118.238.201;user=phone ] 0(13481) get_hdr_field: cseq <CSeq>: <1> <CANCEL> 0(13481) DEBUG: get_hdr_body : content_length=0 0(13481) found end of header 0(13481) DEBUG: is_maxfwd_present: max_forwards header not found! 0(13481) DEBUG: add_param: tag=119525115 0(13481) end of header reached, state=29 0(13481) parse_headers: flags=256 0(13481) find_first_route(): No Route headers found 0(13481) loose_route(): There is no Route HF 0(13481) check_self - checking if host==us: 14==14 && [66.118.238.201] == [66.118.238.201] 0(13481) check_self - checking if port 5060 matches port 5060 0(13481) **********************MYSELF 0(13481) BYE or CANCEL 0(13481) SER: matched ^sip:[0-9]*@ - just numbers - process in route(3) 0(13481) SER: matched ^sip:6126[1,2] - forward to GW in CANBERRA 0(13481) DEBUG: t_addifnew: msg id=124 , global msg id=123 , T on entrance=0xffffffff 0(13481) parse_headers: flags=-1 0(13481) parse_headers: flags=60 0(13481) t_lookup_request: start searching: hash=30407, isACK=0 0(13481) DEBUG: proceeding to pre-RFC3261 transaction matching 0(13481) DEBUG: t_lookup_request: no transaction found 0(13481) DEBUG: t_lookupOriginalT: searching on hash entry 30407 0(13481) DEBUG: t_lookupOriginalT: canceled transaction found (0x402e4e08)! 0(13481) DEBUG: t_lookupOriginalT completed 0(13481) check_via_address(68.91.112.229, 192.168.1.4, 0) 0(13481) DEBUG: add_to_tail_of_timer[4]: 0x402e7040 0(13481) DEBUG: add_to_tail_of_timer[0]: 0x402e7054 0(13481) DEBUG: e2e_cancel: e2e cancel proceeding 0(13481) parse_headers: flags=-1 0(13481) check_via_address(68.91.112.229, 192.168.1.4, 0) 0(13481) WARNING:vqm_resize: resize(0) called 0(13481) DEBUG: cleanup_uacs: RETR/FR timers reset 0(13481) DEBUG: add_to_tail_of_timer[2]: 0x402e6f60 0(13481) DEBUG: reply sent out. buf=0x80c6180: SIP/2.0 2..., shmem=0x402e8420: SIP/2.0 2 0(13481) DEBUG: t_reply: finished 0(13481) DEBUG: e2e_cancel: sending 487 0(13481) parse_headers: flags=-1 0(13481) check_via_address(68.91.112.229, 192.168.1.4, 0) 0(13481) DEBUG: cleanup_uacs: RETR/FR timers reset 0(13481) DEBUG: add_to_tail_of_timer[4]: 0x402e4ebc 0(13481) DEBUG: add_to_tail_of_timer[0]: 0x402e4ed0 0(13481) DEBUG: reply sent out. buf=0x80c6550: SIP/2.0 4..., shmem=0x402e9e68: SIP/2.0 4 0(13481) DEBUG: t_reply: finished 0(13481) SER: new transaction fwd'ed 0(13481) DEBUG:destroy_avp_list: destroing list (nil) 0(13481) receive_msg: cleaning up
Ser doesnt care your Codec.
There may be some rules about header fields that your PSTN provider is insisting. Rules will be like, From username be the DID that was assigned by Provider. Contact address be your server's address.
These are only few to note. There may be other rules.
If you see a reply "403 forbidden", you can assume that the issue is with header rules.
Asterisk sits in the middle but not as proxy. It creates the INVITE message afresh and sends it to carrier. So, most of the rules are automatically satisfied.
You may have to find out from your carrier about these rules.
-Ranga
On Mon, 22 Nov 2004 01:01:57 -0600, Carlos Maynard carlos@hottelephone.com wrote:
I am moving to SER from Asterisk for the radius auth and accounting.
I finally made SER register and authenticate my test endpoint (Cisco ATA 186) :D i can dial to my home phone and my regular phone rings... but when i pick up i have dialtone... i'm pasting SER's output and my ser.cfg below. A codec problem? My carrier is using G729.
I am moving to SER from asterisk... on asterisk i can place callls from this same ATA box trough my carrier. Does SER care what the Codec is ?
Thanks in advance,
Carlos Maynard Jr.
ser.cfg:
listen=66.118.238.201
debug=9 fork=no log_stderror=no
check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) fifo="/tmp/ser_fifo"
loadmodule "/usr/local/lib/ser/modules/mysql.so" loadmodule "/usr/local/lib/ser/modules/auth_radius.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"
modparam("usrloc", "db_mode", 0)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password") modparam("auth_db", "db_url", "mysql://ser:heslo@66.118.238.198/ser") modparam("auth_radius", "radius_config","/usr/local/etc/radiusclient/radiusclient.conf")
modparam("rr", "enable_full_lr", 1)
route{
log(1, "\n**********************ROUTING\n"); # 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; }; record_route(); if (loose_route()) { log(1, "\n**********************LOOSE ROUTE\n"); t_relay(); break; }; if (uri==myself) { log(1, "\n**********************MYSELF\n"); if (method=="REGISTER") { log(1, "REGISTER: Authenticating user\n"); if (!radius_www_authorize("")) { log(1, "REGISTER: challenging user\n"); www_challenge("", "0"); break; }; save("location"); break; }; if (method=="INVITE") { log(1, "INVITE\n"); setflag(1); /* set for accounting (the same
value as in log_flag!) */ };
if (method=="MESSAGE") { log(1, "MESSAGE\n"); setflag(1); /* set for accounting (the same
value as in log_flag!) */ };
if (method=="BYE" || method=="CANCEL") { log (1, "BYE or CANCEL\n"); setflag(1); };
# IF HOST IS JUST NUMBERS SEND TO route(3) FOR E.164 PROCESSING if (uri =~ "^sip:[0-9]*@"){ log(1, "SER: matched ^sip:[0-9]*@ - just numbers
process in route(3)\n"); route(3); break; };
}
} route[3] {
if (uri=~"^sip:[0-9]*@") { log(1, "SER: matched ^sip:6126[1,2] - forward to GW in
CANBERRA\n"); rewritehostport("38.114.15.34:5060"); t_relay_to_udp("38.114.15.34","5060"); break; };
}
Console Output:
0(13481) SIP Request: 0(13481) method: <INVITE> 0(13481) uri: sip:12814192614@66.118.238.201;user=phone 0(13481) version: <SIP/2.0> 0(13481) parse_headers: flags=1 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=1 0(13481) parse_headers: this is the first via 0(13481) After parse_msg... 0(13481) preparing to run routing scripts... 0(13481) **********************ROUTING 0(13481) DEBUG : is_maxfwd_present: searching for max_forwards header 0(13481) parse_headers: flags=128 0(13481) end of header reached, state=9 0(13481) DEBUG: get_hdr_field: <To> [45]; uri=[sip:12814192614@66.118.238.201;user=phone] 0(13481) DEBUG: to body [sip:12814192614@66.118.238.201;user=phone ] 0(13481) get_hdr_field: cseq <CSeq>: <1> <INVITE> 0(13481) DEBUG: get_hdr_body : content_length=268 0(13481) found end of header 0(13481) DEBUG: is_maxfwd_present: max_forwards header not found! 0(13481) DEBUG: add_param: tag=119525115 0(13481) end of header reached, state=29 0(13481) parse_headers: flags=256 0(13481) find_first_route(): No Route headers found 0(13481) loose_route(): There is no Route HF 0(13481) check_self - checking if host==us: 14==14 && [66.118.238.201] == [66.118.238.201] 0(13481) check_self - checking if port 5060 matches port 5060 0(13481) **********************MYSELF 0(13481) INVITE 0(13481) SER: matched ^sip:[0-9]*@ - just numbers - process in route(3) 0(13481) SER: matched ^sip:6126[1,2] - forward to GW in CANBERRA 0(13481) DEBUG: t_addifnew: msg id=121 , global msg id=120 , T on entrance=0xffffffff 0(13481) parse_headers: flags=-1 0(13481) parse_headers: flags=60 0(13481) t_lookup_request: start searching: hash=30407, isACK=0 0(13481) DEBUG: proceeding to pre-RFC3261 transaction matching 0(13481) DEBUG: t_lookup_request: no transaction found 0(13481) SER: new INVITE 0(13481) parse_headers: flags=-1 0(13481) check_via_address(68.91.112.229, 192.168.1.4, 0) 0(13481) WARNING:vqm_resize: resize(0) called 0(13481) DEBUG: reply sent out. buf=0x80c5f20: SIP/2.0 1..., shmem=0x402e4040: SIP/2.0 1 0(13481) DEBUG: t_reply: finished 0(13481) check_via_address(68.91.112.229, 192.168.1.4, 0) 0(13481) DEBUG: add_to_tail_of_timer[4]: 0x402e4f30 0(13481) DEBUG: add_to_tail_of_timer[0]: 0x402e4f44 0(13481) SER: new transaction fwd'ed 0(13481) DEBUG:destroy_avp_list: destroing list (nil) 0(13481) receive_msg: cleaning up 0(13481) SIP Reply (status): 0(13481) version: <SIP/2.0> 0(13481) status: <100> 0(13481) reason: <Trying> 0(13481) parse_headers: flags=1 0(13481) Found param type 232, <branch> = <z9hG4bK7c67.dc0712e3.0>; state=16 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=1 0(13481) parse_headers: this is the first via 0(13481) After parse_msg... 0(13481) forward_reply: found module tm, passing reply to it 0(13481) DEBUG: t_check: msg id=122 global id=121 T start=0xffffffff 0(13481) parse_headers: flags=17 0(13481) Found param type 234, <received> = <192.168.1.4>; state=16 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=17 0(13481) parse_headers: this is the second via 0(13481) end of header reached, state=9 0(13481) DEBUG: get_hdr_field: <To> [45]; uri=[sip:12814192614@66.118.238.201;user=phone] 0(13481) DEBUG: to body [sip:12814192614@66.118.238.201;user=phone ] 0(13481) get_hdr_field: cseq <CSeq>: <1> <INVITE> 0(13481) parse_headers: flags=4 0(13481) DEBUG: t_reply_matching: hash 30407 label 1042378957 branch 0 0(13481) DEBUG: t_reply_matching: reply matched (T=0x402e4e08)! 0(13481) DEBUG: t_check: msg id=122 global id=122 T end=0x402e4e08 0(13481) DEBUG: t_on_reply: org. status uas=100, uac[0]=0 local=0 is_invite=1) 0(13481) ->>>>>>>>> T_code=100, new_code=100 0(13481) DEBUG: relay_reply: branch=0, save=0, relay=-1 0(13481) DEBUG: add_to_tail_of_timer[1]: 0x402e4f44 0(13481) DEBUG:destroy_avp_list: destroing list (nil) 0(13481) receive_msg: cleaning up 1(13482) DEBUG: timer routine:4,tl=0x402e4f30 next=(nil) 0(13481) SIP Reply (status): 0(13481) version: <SIP/2.0> 0(13481) status: <180> 0(13481) reason: <Ringing> 0(13481) parse_headers: flags=1 0(13481) Found param type 232, <branch> = <z9hG4bK7c67.dc0712e3.0>; state=16 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=1 0(13481) parse_headers: this is the first via 0(13481) After parse_msg... 0(13481) forward_reply: found module tm, passing reply to it 0(13481) DEBUG: t_check: msg id=123 global id=122 T start=0xffffffff 0(13481) parse_headers: flags=17 0(13481) Found param type 234, <received> = <192.168.1.4>; state=16 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=17 0(13481) parse_headers: this is the second via 0(13481) DEBUG: add_param: tag=SD40lb399-38 0(13481) end of header reached, state=29 0(13481) DEBUG: get_hdr_field: <To> [62]; uri=[sip:12814192614@66.118.238.201;user=phone] 0(13481) DEBUG: to body [sip:12814192614@66.118.238.201;user=phone] 0(13481) get_hdr_field: cseq <CSeq>: <1> <INVITE> 0(13481) parse_headers: flags=4 0(13481) DEBUG: t_reply_matching: hash 30407 label 1042378957 branch 0 0(13481) DEBUG: t_reply_matching: reply matched (T=0x402e4e08)! 0(13481) DEBUG: t_check: msg id=123 global id=123 T end=0x402e4e08 0(13481) DEBUG: t_on_reply: org. status uas=100, uac[0]=100 local=0 is_invite=1) 0(13481) ->>>>>>>>> T_code=100, new_code=180 0(13481) DEBUG: relay_reply: branch=0, save=0, relay=0 0(13481) old size: 669, new size: 606 0(13481) build_res_from_sip_res: copied size: orig:84, new: 21, rest: 585 msg= SIP/2.0 180 Ringing Via: SIP/2.0/UDP 192.168.1.4:5060;received=192.168.1.4 From: Line 0 sip:2000@66.118.238.201;user=phone;tag=119525115 To: sip:12814192614@66.118.238.201;user=phone;tag=SD40lb399-38 Call-ID: 2912392921@68.91.112.229 CSeq: 1 INVITE Record-Route: sip:12814192614@66.118.238.201;ftag=119525115;lr=on Content-Length: 176 Content-Disposition: session;handling=required Content-Type: application/sdp
v=0 o=Sonus_UAC 22631 32400 IN IP4 38.114.15.34 s=SIP Media Capabilities c=IN IP4 38.114.15.34 t=0 0 m=audio 6220 RTP/AVP 18 a=fmtp:18 annexb:no a=sendrecv a=ptime:20
0(13481) DEBUG: reply relayed. buf=0x80c67b0: SIP/2.0 1..., shmem=0x402e6840: SIP/2.0 1 0(13481) DEBUG: add_to_tail_of_timer[1]: 0x402e4f44 0(13481) DEBUG:destroy_avp_list: destroing list (nil) 0(13481) receive_msg: cleaning up
0(13481) SIP Request: 0(13481) method: <CANCEL> 0(13481) uri: sip:12814192614@66.118.238.201;user=phone 0(13481) version: <SIP/2.0> 0(13481) parse_headers: flags=1 0(13481) end of header reached, state=5 0(13481) parse_headers: Via found, flags=1 0(13481) parse_headers: this is the first via 0(13481) After parse_msg... 0(13481) preparing to run routing scripts... 0(13481) **********************ROUTING 0(13481) DEBUG : is_maxfwd_present: searching for max_forwards header 0(13481) parse_headers: flags=128 0(13481) end of header reached, state=9 0(13481) DEBUG: get_hdr_field: <To> [45]; uri=[sip:12814192614@66.118.238.201;user=phone] 0(13481) DEBUG: to body [sip:12814192614@66.118.238.201;user=phone ] 0(13481) get_hdr_field: cseq <CSeq>: <1> <CANCEL> 0(13481) DEBUG: get_hdr_body : content_length=0 0(13481) found end of header 0(13481) DEBUG: is_maxfwd_present: max_forwards header not found! 0(13481) DEBUG: add_param: tag=119525115 0(13481) end of header reached, state=29 0(13481) parse_headers: flags=256 0(13481) find_first_route(): No Route headers found 0(13481) loose_route(): There is no Route HF 0(13481) check_self - checking if host==us: 14==14 && [66.118.238.201] == [66.118.238.201] 0(13481) check_self - checking if port 5060 matches port 5060 0(13481) **********************MYSELF 0(13481) BYE or CANCEL 0(13481) SER: matched ^sip:[0-9]*@ - just numbers - process in route(3) 0(13481) SER: matched ^sip:6126[1,2] - forward to GW in CANBERRA 0(13481) DEBUG: t_addifnew: msg id=124 , global msg id=123 , T on entrance=0xffffffff 0(13481) parse_headers: flags=-1 0(13481) parse_headers: flags=60 0(13481) t_lookup_request: start searching: hash=30407, isACK=0 0(13481) DEBUG: proceeding to pre-RFC3261 transaction matching 0(13481) DEBUG: t_lookup_request: no transaction found 0(13481) DEBUG: t_lookupOriginalT: searching on hash entry 30407 0(13481) DEBUG: t_lookupOriginalT: canceled transaction found (0x402e4e08)! 0(13481) DEBUG: t_lookupOriginalT completed 0(13481) check_via_address(68.91.112.229, 192.168.1.4, 0) 0(13481) DEBUG: add_to_tail_of_timer[4]: 0x402e7040 0(13481) DEBUG: add_to_tail_of_timer[0]: 0x402e7054 0(13481) DEBUG: e2e_cancel: e2e cancel proceeding 0(13481) parse_headers: flags=-1 0(13481) check_via_address(68.91.112.229, 192.168.1.4, 0) 0(13481) WARNING:vqm_resize: resize(0) called 0(13481) DEBUG: cleanup_uacs: RETR/FR timers reset 0(13481) DEBUG: add_to_tail_of_timer[2]: 0x402e6f60 0(13481) DEBUG: reply sent out. buf=0x80c6180: SIP/2.0 2..., shmem=0x402e8420: SIP/2.0 2 0(13481) DEBUG: t_reply: finished 0(13481) DEBUG: e2e_cancel: sending 487 0(13481) parse_headers: flags=-1 0(13481) check_via_address(68.91.112.229, 192.168.1.4, 0) 0(13481) DEBUG: cleanup_uacs: RETR/FR timers reset 0(13481) DEBUG: add_to_tail_of_timer[4]: 0x402e4ebc 0(13481) DEBUG: add_to_tail_of_timer[0]: 0x402e4ed0 0(13481) DEBUG: reply sent out. buf=0x80c6550: SIP/2.0 4..., shmem=0x402e9e68: SIP/2.0 4 0(13481) DEBUG: t_reply: finished 0(13481) SER: new transaction fwd'ed 0(13481) DEBUG:destroy_avp_list: destroing list (nil) 0(13481) receive_msg: cleaning up
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers