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(a)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