Hi Edson.
I want to know that why my Cisco AS 5300 didn't send BYE for SER...?
Maybe... I doubt that maybe my 5300 have only dial-peer 6000 voice "POTS" configure for outgoing PSTN call. In case of PSTN incoming call have no problem about sending BYE for SER, Because it is apply dial-peer voice 5000 "VOIP" confiure as follows:
[SER] <- [5300 (VOIP dial-peer)] <- [PSTN]
So I'll try to re-configure my 5300 dial-peer, or please give me a hint If anyone have some way to solve this problem.
Thanks,
Sahria
2007/2/6, Edson 4lists@gmail.com:
I have this same behaviour, but never give it great importance, since we didn't bill incomming calls…
But it would be great to know if it's because of a misconfiguration or a bug… but we notice that many ports become unavaliable (blocked) over time. To release we programmed a reboot every day on 3AM…J
Even with 'ngrep' the BYE, when PSTN side disconnects, didn't show up…
Edson.
*From:* serusers-bounces@lists.iptel.org [mailto: serusers-bounces@lists.iptel.org] *On Behalf Of *Sahria Hao *Sent:* segunda-feira, 5 de fevereiro de 2007 08:36 *To:* serusers@lists.iptel.org *Subject:* Re: [Serusers] Cisco AS 5300 can't send BYE for SER... It's bug?
Hi Greger,
And I'm very sorry for my poor exposition.
Do you get an error on the 5300?
No, my 5300 works well and there's no error.
Is it sent, but never reaches SER?
No, when I finished call by PSTN side, 5300 didn't send BYE for SER.
Does SER receive, but does not recognize it?
SER didn't receive a message from 5300 entirely.
I think that when I finished this call, 5300 must send a BYE message for SER... but didn't send it. 2007/2/5, Greger V. Teigre greger@teigre.com:
- [Cisco] can't send BYE for SER *****why??*****
What does that mean?! Do you get an error on the 5300? Is it sent, but never reaches SER? Does SER receive, but does not recognize it? g-)
Sho Aihara wrote:
Hi all.
I have a problem for the following scenario. When I make a call for PSTN and on hook by PSTN side, Cisco As can't send BYE for SER.
- [UA via Asterisk] dialing "08022223333" -> [SER]
- [SER] prefix("0333") and rewritehostport("my.cisco.ip.address:5060")
-> [Cisco] 03. [Cisco] dial-peer voice 6000 pots, translate-outgoing called from "033308022223333" to "008022223333" 04. [Cisco] process an outbound call to "008022223333" -> [e.g. Mobile] 05. [e.g. Mobile] Catch call 06. [SER] log CDR start 07. [Cisco] talking 08. [e.g. Mobile] On hook and call disconnect 09. [Cisco] can't send BYE for SER *****why??***** 10. [UA via Asterisk] On hook 11. [UA via Asterisk] Send BYE for SER 12. [SER] log CDR End [Cisco] Call finished
But another scenario, if make a call from PSTN to Asterisk and on hook by PSTN side, Cisco As send BYE to SER.
- [e.g. Mobile] dialing "0377771111(Asterisk user number)"
- [Cisco] receive "77771111" call number
- [Cisco] dial-peer voice 5000 voip, session target ipv4:
my.ser.ip.address -> [SER] 04. [SER] process an incoming call to "0377771111" -> [UA via Asterisk] 05. [UA via Asterisk] Catch call 06. [SER] log CDR start 07. [UA via Asterisk] talking 08. [e.g. Mobile] On hook and call disconnect 09. [Cisco] Send BYE to SER 10. [SER] log CDR End [Cisco] Call finished 11. [UA via Asterisk] receive BYE from SER
And sorry for my diffucult example.
Why Cisco AS 5300 can't send BYE to SER When PSTN call is disconnected by PSTN side?
My ser.cfg as follows:
#
# global configuration parameters
#
fork=no log_stderror=yes check_via=no dns=no rev_dns=no listen=my.ser.ip.address port=5060 fifo="/tmp/ser_fifo" fifo_db_url="mysql://ser:heslo@localhost/ser"
#
# module loading
#
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/textops.so" loadmodule "/usr/local/lib/ser/modules/auth.so" loadmodule "/usr/local/lib/ser/modules/auth_db.so" loadmodule "/usr/local/lib/ser/modules/avpops.so" loadmodule "/usr/local/lib/ser/modules/permissions.so" loadmodule "/usr/local/lib/ser/modules/acc.so" loadmodule "/usr/local/lib/ser/modules/exec.so"
#
# setting module-specific parameters
#
modparam("usrloc", "db_mode", 2) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "password") modparam("rr", "enable_full_lr", 1) modparam("usrloc", "db_url", " mysql://ser:heslo@localhost/ser") modparam("auth_db", "db_url", "mysql://ser:heslo@localhost/ser") modparam("permissions", "db_url", "mysql://ser:heslo@localhost /ser") 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("acc", "db_url", "mysql://ser:heslo@localhost/ser") modparam("acc", "db_flag", 2) modparam("acc", "db_missed_flag", 3)
#
# route pattern
#
route {
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()) { if (method=="ACK") { acc_db_request("01:CallStart\n", "acc"); }; if (method=="BYE" || method=="CANCEL") { acc_db_request("02:CallEnd\n", "acc"); }; t_relay(); break; };
if (uri==myself) { if (method=="REGISTER") { if (!www_authorize("", "subscriber")) { www_challenge("", "0"); break; }; save("location"); break; };
if (search("^(f|From): .*@(my\.cisco\.ip\.address<.*@%28my%5C.cisco%5C.ip%5C.address>)"))
{ #PSTN Incoming call from Cisco AS 5300 e.g. 0377771111 rewritehost("my.asterisk.ip.address "); };
lookup("aliases"); if (!lookup("location")) { if (method=="INVITE" && !search("^(f|From):
.*@(my.cisco.ip.address <.*@%28my%5C.cisco%5C.ip%5C.address>)")) { if (!proxy_authorize("", "subscriber")) { proxy_challenge("", "0"); break; }; if (uri=~"^sip:0[0-9]{10}@") { # PSTN Outgoing call to Cisco AS 5300 e.g. 08022223333 prefix("0333"); rewritehostport("my.cisco.ip.address:5060"); avp_write("i:45", "inv_timeout"); } else { sl_send_reply("404", "Not Found"); break; }; consume_credentials(); }; };
};
if (!t_relay()) { sl_reply_error(); };
}
And my Cisco AS 5300 config as follows:
voice call send-alert voice rtp send-recv
voice service pots fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco
voice service voip fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco sip min-se 60
translation-rule 50 Rule 0 0333 0 Rule 1 ^7777 037777
voice class codec 2 codec preference 1 g711ulaw codec preference 2 g711alaw
dial-peer voice 5000 voip tone ringback alert-no-PI description ser-asterisk-cisco-test huntstop destination-pattern 77771111$ translate-outgoing called 50 voice-class codec 2 session protocol sipv2 session target ipv4:my.ser.ip.address dtmf-relay rtp-nte max-conn 1
dial-peer voice 6000 pots application session max-conn 2 destination-pattern 0333T progress_ind alert enable 8 translate-outgoing called 50 port 0:D
Thanks, Sahria
Serusers mailing list
Serusers@lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
--
shosuke msn : anseie@hotmail.co.jp email : sahria.hao@gmail.com
Hm. I've worked with 5300s without any problems... But I haven't done the cisco config, though... I would have tried to listen directly on the Cisco network port to see if any packet shows up. Of course, debugging turned on to see what happens. Upgrade IOS => still no change, and I would've filed a ticket with Cisco. g-)
Sahria Hao wrote:
HiEdson. I want to knowthat why my Cisco AS 5300 didn't send BYE for SER...? Maybe... Idoubt that maybe my 5300 haveonlydial-peer 6000voice"POTS" configurefor outgoing PSTN call. In case of PSTN incoming call have no problem about sendingBYE for SER, Because it is apply dial-peer voice 5000 "VOIP" confiure as follows: [SER] <- [5300 (VOIP dial-peer)] <- [PSTN] So I'll try to re-configure my 5300 dial-peer, or pleasegive mea hintIf anyone have some way to solve this problem. Thanks, Sahria 2007/2/6, Edson <4lists@gmail.com mailto:4lists@gmail.com>:
I have this same behaviour, but never give it great importance, since we didn't bill incomming calls… But it would be great to know if it's because of a misconfiguration or a bug… but we notice that many ports become unavaliable (blocked) over time. To release we programmed a reboot every day on 3AM… J Even with 'ngrep' the BYE, when PSTN side disconnects, didn't show up… Edson. ------------------------------------------------------------------------ *From:* serusers-bounces@lists.iptel.org <mailto:serusers-bounces@lists.iptel.org> [mailto: serusers-bounces@lists.iptel.org <mailto:serusers-bounces@lists.iptel.org>] *On Behalf Of *Sahria Hao *Sent:* segunda-feira, 5 de fevereiro de 2007 08:36 *To:* serusers@lists.iptel.org <mailto:serusers@lists.iptel.org> *Subject:* Re: [Serusers] Cisco AS 5300 can't send BYE for SER... It's bug? Hi Greger, AndI'm verysorry for my poor exposition. >>Do you get an error on the 5300? No, my 5300 works well and there's no error. >>Is it sent, but never reaches SER? No, when I finished callby PSTN side, 5300 didn't send BYE for SER. >>Does SER receive, but does not recognize it? SER didn't receive a message from 5300 entirely. I think that when I finished this call,5300must send aBYE message for SER... but didn't send it. 2007/2/5, Greger V. Teigre <greger@teigre.com <mailto:greger@teigre.com>>: 09. [Cisco] can't send BYEfor SER *****why??***** What does that mean?! Do you get an error on the 5300? Is it sent, but never reaches SER? Does SER receive, but does not recognize it? g-) Sho Aihara wrote: Hi all. I have a problem for the following scenario. When I make a call for PSTN and on hook by PSTN side, Cisco As can't send BYEfor SER. 01. [UA via Asterisk] dialing "08022223333" -> [SER] 02. [SER] prefix("0333") and rewritehostport("my.cisco.ip.address :5060") -> [Cisco] 03. [Cisco] dial-peer voice 6000 pots, translate-outgoing called from "033308022223333" to "008022223333" 04. [Cisco] process an outbound call to "008022223333" -> [ e.g. Mobile] 05. [e.g. Mobile] Catch call 06. [SER] log CDR start 07. [Cisco] talking 08. [e.g. Mobile] On hook and call disconnect 09. [Cisco] can't send BYEfor SER *****why??***** 10. [UA via Asterisk] On hook 11. [UA via Asterisk] Send BYEfor SER 12. [SER] log CDR End [Cisco] Call finished But another scenario, if make a call from PSTN to Asterisk and on hook by PSTN side, Cisco As send BYE to SER. 01. [e.g. Mobile] dialing "0377771111(Asterisk user number)" 02. [Cisco] receive "77771111" call number 03. [Cisco] dial-peer voice 5000 voip, session target ipv4: my.ser.ip.address -> [SER] 04. [SER] process an incoming call to "0377771111" -> [UA via Asterisk] 05. [UA via Asterisk] Catch call 06. [SER] log CDR start 07. [UA via Asterisk] talking 08. [e.g. Mobile] On hook and call disconnect 09. [Cisco] Send BYE to SER 10. [SER] log CDR End [Cisco] Callfinished 11. [UA via Asterisk] receive BYE from SER And sorry for my diffucult example. Why Cisco AS 5300 can't send BYE to SER When PSTN call is disconnected by PSTN side? My ser.cfg as follows: # -------------------------------------------------------------------------- # global configuration parameters # -------------------------------------------------------------------------- fork=no log_stderror=yes check_via=no dns=no rev_dns=no listen=my.ser.ip.address port=5060 fifo="/tmp/ser_fifo" fifo_db_url="mysql://ser:heslo@localhost/ser" # -------------------------------------------------------------------------- # module loading # -------------------------------------------------------------------------- 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/textops.so" loadmodule "/usr/local/lib/ser/modules/auth.so" loadmodule "/usr/local/lib/ser/modules/auth_db.so" loadmodule "/usr/local/lib/ser/modules/avpops.so" loadmodule "/usr/local/lib/ser/modules/permissions.so" loadmodule "/usr/local/lib/ser/modules/acc.so" loadmodule "/usr/local/lib/ser/modules/exec.so" # -------------------------------------------------------------------------- # setting module-specific parameters # -------------------------------------------------------------------------- modparam("usrloc", "db_mode", 2) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "password") modparam("rr", "enable_full_lr", 1) modparam("usrloc", "db_url", " mysql://ser:heslo@localhost/ser") modparam("auth_db", "db_url", "mysql://ser:heslo@localhost/ser") modparam("permissions", "db_url", " mysql://ser:heslo@localhost /ser") 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("acc", "db_url", "mysql://ser:heslo@localhost/ser") modparam("acc", "db_flag", 2) modparam("acc", "db_missed_flag", 3) # -------------------------------------------------------------------------- # route pattern # -------------------------------------------------------------------------- route { 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()) { if (method=="ACK") { acc_db_request("01:CallStart\n", "acc"); }; if (method=="BYE" || method=="CANCEL") { acc_db_request("02:CallEnd\n", "acc"); }; t_relay(); break; }; if (uri==myself) { if (method=="REGISTER") { if (!www_authorize("", "subscriber")) { www_challenge("", "0"); break; }; save("location"); break; }; if (search("^(f|From): .*@(my\.cisco\.ip\.address <mailto:.*@%28my%5C.cisco%5C.ip%5C.address>)")) { #PSTN Incoming call from Cisco AS 5300 e.g. 0377771111 rewritehost("my.asterisk.ip.address "); }; lookup("aliases"); if (!lookup("location")) { if (method=="INVITE" && !search("^(f|From): .*@(my\.cisco\.ip\.address <mailto:.*@%28my%5C.cisco%5C.ip%5C.address>)")) { if (!proxy_authorize("", "subscriber")) { proxy_challenge("", "0"); break; }; if (uri=~"^sip:0[0-9]{10}@") { # PSTN Outgoing call to Cisco AS 5300 e.g. 08022223333 prefix("0333"); rewritehostport("my.cisco.ip.address:5060"); avp_write("i:45", "inv_timeout"); } else { sl_send_reply("404", "Not Found"); break; }; consume_credentials(); }; }; }; if (!t_relay()) { sl_reply_error(); }; } And my Cisco AS 5300 config as follows: voice call send-alert voice rtp send-recv voice service pots fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco voice service voip fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco sip min-se 60 translation-rule 50 Rule 0 0333 0 Rule 1 ^7777 037777 voice class codec 2 codec preference 1 g711ulaw codec preference 2 g711alaw dial-peer voice 5000 voip tone ringback alert-no-PI description ser-asterisk-cisco-test huntstop destination-pattern 77771111$ translate-outgoing called 50 voice-class codec 2 session protocol sipv2 session target ipv4:my.ser.ip.address dtmf-relay rtp-nte max-conn 1 dial-peer voice 6000 pots application session max-conn 2 destination-pattern 0333T progress_ind alert enable 8 translate-outgoing called 50 port 0:D Thanks, Sahria ------------------------------------------------------------------------ _______________________________________________ Serusers mailing list Serusers@lists.iptel.org <mailto:Serusers@lists.iptel.org> http://lists.iptel.org/mailman/listinfo/serusers -- ---------- shosuke msn : anseie@hotmail.co.jp <mailto:anseie@hotmail.co.jp> email : sahria.hao@gmail.com <mailto:sahria.hao@gmail.com>
Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Thanks for Harry and Greger.
Then, I test incoming and outgoing call for capture SIP messages by cisco as 5300.
Feb 6 11:54:45.028: Received: INVITE sip:056708077771111@MY.AS5300.IP.ADDRESS:5060 SIP/2.0 Record-Route: sip:MY.SER.IP.ADDRESS;ftag=as2deea38f;lr=on Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=z9hG4bK2b5e.7cc1de11.0 Via: SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS :5060;branch=z9hG4bK687f6fc7;rport=5060 From: "12" sip:0355558888@srv5.agile.ne.jp;tag=as2deea38f To: sip:08077771111@MY.SER.IP.ADDRESS Contact: sip:0355558888@MY.ASTERISK.IP.ADDRESS Call-ID: 089003277f7ea22d113bd56b186b6bc1@MY.SER.IP.ADDRESS CSeq: 103 INVITE User-Agent: Asterisk Max-Forwards: 16 Remote-Party-ID: "12" <sip:0355558888@MY.SER.IP.ADDRESS
;privacy=off;screen=no
Date: Tue, 06 Feb 2007 11:54:45 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Content-Type: application/sdp Content-Length: 222 (From: "12" is an UA registered on Asterisk)
And I found it.
Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=z9hG4bK2b5e.7cc1de11.0
Why SER Via haven't port (5060) number or rport ? (Asterisk Via have port number and rport)
Thanks,
Sahria 07/02/06 に Greger V. Teigre greger@teigre.com さんは書きました:
Hm. I've worked with 5300s without any problems... But I haven't done the cisco config, though... I would have tried to listen directly on the Cisco network port to see if any packet shows up. Of course, debugging turned on to see what happens. Upgrade IOS => still no change, and I would've filed a ticket with Cisco. g-)
Sahria Hao wrote:
Hi Edson.
I want to know that why my Cisco AS 5300 didn't send BYE for SER...?
Maybe... I doubt that maybe my 5300 have only dial-peer 6000 voice "POTS" configure for outgoing PSTN call. In case of PSTN incoming call have no problem about sending BYE for SER, Because it is apply dial-peer voice 5000 "VOIP" confiure as follows:
[SER] <- [5300 (VOIP dial-peer)] <- [PSTN]
So I'll try to re-configure my 5300 dial-peer, or please give me a hint If anyone have some way to solve this problem.
Thanks,
Sahria
2007/2/6, Edson 4lists@gmail.com:
I have this same behaviour, but never give it great importance, since we didn't bill incomming calls…
But it would be great to know if it's because of a misconfiguration or a bug… but we notice that many ports become unavaliable (blocked) over time. To release we programmed a reboot every day on 3AM… J
Even with 'ngrep' the BYE, when PSTN side disconnects, didn't show up…
Edson.
*From:* serusers-bounces@lists.iptel.org [mailto:serusers-bounces@lists.iptel.org] *On Behalf Of *Sahria Hao *Sent:* segunda-feira, 5 de fevereiro de 2007 08:36 *To:* serusers@lists.iptel.org *Subject:* Re: [Serusers] Cisco AS 5300 can't send BYE for SER... It's bug?
Hi Greger,
And I'm very sorry for my poor exposition.
Do you get an error on the 5300?
No, my 5300 works well and there's no error.
Is it sent, but never reaches SER?
No, when I finished call by PSTN side, 5300 didn't send BYE for SER.
Does SER receive, but does not recognize it?
SER didn't receive a message from 5300 entirely.
I think that when I finished this call, 5300 must send a BYE message for SER... but didn't send it. 2007/2/5, Greger V. Teigre greger@teigre.com:
- [Cisco] can't send BYE for SER *****why??*****
What does that mean?! Do you get an error on the 5300? Is it sent, but never reaches SER? Does SER receive, but does not recognize it? g-)
Sho Aihara wrote:
Hi all.
I have a problem for the following scenario. When I make a call for PSTN and on hook by PSTN side, Cisco As can't send BYE for SER.
- [UA via Asterisk] dialing "08022223333" -> [SER]
- [SER] prefix("0333") and rewritehostport("my.cisco.ip.address:5060") -> [Cisco]
- [Cisco] dial-peer voice 6000 pots, translate-outgoing called from
"033308022223333" to "008022223333" 04. [Cisco] process an outbound call to "008022223333" -> [ e.g. Mobile] 05. [e.g. Mobile] Catch call 06. [SER] log CDR start 07. [Cisco] talking 08. [e.g. Mobile] On hook and call disconnect 09. [Cisco] can't send BYE for SER *****why??***** 10. [UA via Asterisk] On hook 11. [UA via Asterisk] Send BYE for SER 12. [SER] log CDR End [Cisco] Call finished
But another scenario, if make a call from PSTN to Asterisk and on hook by PSTN side, Cisco As send BYE to SER.
- [e.g. Mobile] dialing "0377771111(Asterisk user number)"
- [Cisco] receive "77771111" call number
- [Cisco] dial-peer voice 5000 voip, session target ipv4:
my.ser.ip.address -> [SER] 04. [SER] process an incoming call to "0377771111" -> [UA via Asterisk] 05. [UA via Asterisk] Catch call 06. [SER] log CDR start 07. [UA via Asterisk] talking 08. [e.g. Mobile] On hook and call disconnect 09. [Cisco] Send BYE to SER 10. [SER] log CDR End [Cisco] Call finished 11. [UA via Asterisk] receive BYE from SER
And sorry for my diffucult example.
Why Cisco AS 5300 can't send BYE to SER When PSTN call is disconnected by PSTN side?
My ser.cfg as follows:
#
# global configuration parameters
#
fork=no log_stderror=yes check_via=no dns=no rev_dns=no listen=my.ser.ip.address port=5060 fifo="/tmp/ser_fifo" fifo_db_url="mysql://ser:heslo@localhost/ser"
#
# module loading
#
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/textops.so" loadmodule "/usr/local/lib/ser/modules/auth.so" loadmodule "/usr/local/lib/ser/modules/auth_db.so" loadmodule "/usr/local/lib/ser/modules/avpops.so" loadmodule "/usr/local/lib/ser/modules/permissions.so" loadmodule "/usr/local/lib/ser/modules/acc.so" loadmodule "/usr/local/lib/ser/modules/exec.so"
#
# setting module-specific parameters
#
modparam("usrloc", "db_mode", 2) modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "password") modparam("rr", "enable_full_lr", 1) modparam("usrloc", "db_url", " mysql://ser:heslo@localhost/ser") modparam("auth_db", "db_url", "mysql://ser:heslo@localhost/ser") modparam("permissions", "db_url", " mysql://ser:heslo@localhost /ser") 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("acc", "db_url", "mysql://ser:heslo@localhost/ser") modparam("acc", "db_flag", 2) modparam("acc", "db_missed_flag", 3)
#
# route pattern
#
route {
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()) { if (method=="ACK") { acc_db_request("01:CallStart\n", "acc"); }; if (method=="BYE" || method=="CANCEL") { acc_db_request("02:CallEnd\n", "acc"); }; t_relay(); break; };
if (uri==myself) { if (method=="REGISTER") { if (!www_authorize("", "subscriber")) { www_challenge("", "0"); break; }; save("location"); break; };
if (search("^(f|From): .*@(my\.cisco\.ip\.address<.*@%28my%5C.cisco%5C.ip%5C.address>)"))
{ #PSTN Incoming call from Cisco AS 5300 e.g. 0377771111 rewritehost("my.asterisk.ip.address "); };
lookup("aliases"); if (!lookup("location")) { if (method=="INVITE" && !search("^(f|From):
.*@(my.cisco.ip.address <.*@%28my%5C.cisco%5C.ip%5C.address>)")) { if (!proxy_authorize("", "subscriber")) { proxy_challenge("", "0"); break; }; if (uri=~"^sip:0[0-9]{10}@") { # PSTN Outgoing call to Cisco AS 5300 e.g. 08022223333 prefix("0333"); rewritehostport("my.cisco.ip.address:5060"); avp_write("i:45", "inv_timeout"); } else { sl_send_reply("404", "Not Found"); break; }; consume_credentials(); }; };
};
if (!t_relay()) { sl_reply_error(); };
}
And my Cisco AS 5300 config as follows:
voice call send-alert voice rtp send-recv
voice service pots fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco
voice service voip fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco sip min-se 60
translation-rule 50 Rule 0 0333 0 Rule 1 ^7777 037777
voice class codec 2 codec preference 1 g711ulaw codec preference 2 g711alaw
dial-peer voice 5000 voip tone ringback alert-no-PI description ser-asterisk-cisco-test huntstop destination-pattern 77771111$ translate-outgoing called 50 voice-class codec 2 session protocol sipv2 session target ipv4:my.ser.ip.address dtmf-relay rtp-nte max-conn 1
dial-peer voice 6000 pots application session max-conn 2 destination-pattern 0333T progress_ind alert enable 8 translate-outgoing called 50 port 0:D
Thanks, Sahria
Serusers mailing list
Serusers@lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
--
shosuke msn : anseie@hotmail.co.jp email : sahria.hao@gmail.com
Serusers mailing listSerusers@lists.iptel.orghttp://lists.iptel.org/mailman/listinfo/serusers
I got an additional SIP message log from my 5300.
Scenario:
[UA] => [Asterisk] => [SER] => [CISCO AS5300] => [PSTN]
[UA] "12" [Asterisk] 0355558888@MY.ASTERISK.IP.ADDRESS [SER] MY.SER.IP.ADDRESS [CISCO AS5300] MY.AS5300.IP.ADDRESS [PSTN] T1 Line
And maybe I found little bad Via header in ACK message from Asterisk (via SER) to AS5300.
Feb 7 03:22:34.401: Received: ACK sip:056708077771111@MY.AS5300.IP.ADDRESS:5060 SIP/2.0 Record-Route: sip:MY.SER.IP.ADDRESS;ftag=as2ad98fe4;lr Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=0 Via: SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS :5060;branch=z9hG4bK0a0daaf9;rport=5060 ...
Why Via header looks like no branch value and port value...? And all SIP messages have no Route header.
I attached AS5300 SIP message log (see below).
Any ideas?
Sahria
----------------------------------------------------------------------
Feb 7 03:22:27.284: Received: INVITE sip:056708077771111@MY.AS5300.IP.ADDRESS:5060 SIP/2.0 Record-Route: sip:MY.SER.IP.ADDRESS;ftag=as2ad98fe4;lr Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=z9hG4bK4e7f.1aea06e5.0 Via: SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS :5060;branch=z9hG4bK7a1f165b;rport=5060 From: "12" sip:0355558888@MY.SER.IP.ADDRESS;tag=as2ad98fe4 To: < sip:08077771111@MY.SER.IP.ADDRESS> Contact: sip:0355558888@MY.ASTERISK.IP.ADDRESS Call-ID: 351d8bb44819a06a4ad0ee7730518ea6@MY.SER.IP.ADDRESS CSeq: 103 INVITE User-Agent: Asterisk Max-Forwards: 16 Remote-Party-ID: "12" < sip:0355558888@MY.SER.IP.ADDRESS
;privacy=off;screen=no
Proxy-Authorization: Digest username="0355558888", realm="MY.SER.IP.ADDRESS", algorithm=MD5, uri=" sip:08077771111@MY.SER.IP.ADDRESS", nonce="45c9470e4c66d95af025624109fe107c5c292604", response="f94ac0f87471cc79c86cd2253fecf71f", opaque="" Date: Wed, 07 Feb 2007 03:22:27 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Content-Type: application/sdp Content-Length: 222 Min-SE: 60
v=0 o=root 29956 29957 IN IP4 MY.ASTERISK.IP.ADDRESS s=session c=IN IP4 MY.ASTERISK.IP.ADDRESS t=0 0 m=audio 13250 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - -
Feb 7 03:22:27.300: Sent: SIP/2.0 100 Trying Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=z9hG4bK4e7f.1aea06e5.0,SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS:5060;branch=z9hG4bK7a1f165b;rport=5060 From: "12" < sip:0355558888@MY.SER.IP.ADDRESS>;tag=as2ad98fe4 To: sip:08077771111@MY.SER.IP.ADDRESS;tag=28713870-2583 Date: Wed, 07 Feb 2007 03:22:27 GMT Call-ID: 351d8bb44819a06a4ad0ee7730518ea6@MY.SER.IP.ADDRESS Server: Cisco-SIPGateway/IOS-12.x CSeq: 103 INVITE Allow-Events: telephone-event Content-Length: 0
Feb 7 03:22:28.552: Sent: SIP/2.0 183 Session Progress Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=z9hG4bK4e7f.1aea06e5.0,SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS:5060;branch=z9hG4bK7a1f165b;rport=5060 From: "12" < sip:0355558888@MY.SER.IP.ADDRESS>;tag=as2ad98fe4 To: sip:08077771111@MY.SER.IP.ADDRESS;tag=28713870-2583 Date: Wed, 07 Feb 2007 03:22:27 GMT Call-ID: 351d8bb44819a06a4ad0ee7730518ea6@MY.SER.IP.ADDRESS Server: Cisco-SIPGateway/IOS-12.x CSeq: 103 INVITE Allow-Events: telephone-event Contact: sip:056708077771111@MY.AS5300.IP.ADDRESS:5060 Record-Route: sip:MY.SER.IP.ADDRESS;ftag=as2ad98fe4;lr Content-Disposition: session;handling=required Content-Type: application/sdp Content-Length: 237
v=0 o=CiscoSystemsSIP-GW-UserAgent 792 3780 IN IP4 MY.AS5300.IP.ADDRESS s=SIP Call c=IN IP4 MY.AS5300.IP.ADDRESS t=0 0 m=audio 16672 RTP/AVP 0 101 c=IN IP4 MY.AS5300.IP.ADDRESS a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16
Feb 7 03:22:34.377: %ISDN-6-CONNECT: Interface Serial0:0 is now connected to 08077771111 N/A Feb 7 03:22:34.381: Sent: SIP/2.0 200 OK Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=z9hG4bK4e7f.1aea06e5.0,SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS:5060;branch=z9hG4bK7a1f165b;rport=5060 From: "12" sip:0355558888@MY.SER.IP.ADDRESS;tag=as2ad98fe4 To: < sip:08077771111@MY.SER.IP.ADDRESS>;tag=28713870-2583 Date: Wed, 07 Feb 2007 03:22:27 GMT Call-ID: 351d8bb44819a06a4ad0ee7730518ea6@MY.SER.IP.ADDRESS Server: Cisco-SIPGateway/IOS-12.x CSeq: 103 INVITE Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO Allow-Events: telephone-event Contact: <sip:056708077771111@MY.AS5300.IP.ADDRESS :5060> Record-Route: sip:MY.SER.IP.ADDRESS;ftag=as2ad98fe4;lr Content-Type: application/sdp Content-Length: 237
v=0 o=CiscoSystemsSIP-GW-UserAgent 792 3780 IN IP4 MY.AS5300.IP.ADDRESS s=SIP Call c=IN IP4 MY.AS5300.IP.ADDRESS t=0 0 m=audio 16672 RTP/AVP 0 101 c=IN IP4 MY.AS5300.IP.ADDRESS a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16
Feb 7 03:22:34.401: Received: ACK sip:056708077771111@MY.AS5300.IP.ADDRESS:5060 SIP/2.0 Record-Route: sip:MY.SER.IP.ADDRESS;ftag=as2ad98fe4;lr Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=0 Via: SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS :5060;branch=z9hG4bK0a0daaf9;rport=5060 From: "12" sip:0355558888@MY.SER.IP.ADDRESS;tag=as2ad98fe4 To: < sip:08077771111@MY.SER.IP.ADDRESS>;tag=28713870-2583 Contact: sip:0355558888@MY.ASTERISK.IP.ADDRESS Call-ID: 351d8bb44819a06a4ad0ee7730518ea6@MY.SER.IP.ADDRESS CSeq: 103 ACK User-Agent: Asterisk Max-Forwards: 16 Remote-Party-ID: "12" <sip:0355558888@MY.SER.IP.ADDRESS
;privacy=off;screen=no
Content-Length: 0
############################################### hook on PSTN side, but 5300 doesn't send BYE. ###############################################
Feb 7 03:22:41.577: %ISDN-6-DISCONNECT: Interface Serial0:0 disconnected from 08077771111 , call lasted 7 seconds
############################################### hook on Asterisk side, Asterisk send BYE. ###############################################
Feb 7 03:22:47.629: Received: BYE sip:056708077771111@MY.AS5300.IP.ADDRESS:5060 SIP/2.0 Record-Route: sip:MY.SER.IP.ADDRESS;ftag=as2ad98fe4;lr Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=z9hG4bK1e7f.d4c7e994.0 Via: SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS :5060;branch=z9hG4bK02d74e09;rport=5060 From: "12" sip:0355558888@MY.SER.IP.ADDRESS;tag=as2ad98fe4 To: < sip:08077771111@MY.SER.IP.ADDRESS>;tag=28713870-2583 Call-ID: 351d8bb44819a06a4ad0ee7730518ea6@MY.SER.IP.ADDRESS CSeq: 104 BYE User-Agent: Asterisk Max-Forwards: 16 Remote-Party-ID: "12" <sip:0355558888@MY.SER.IP.ADDRESS
;privacy=off;screen=no
Proxy-Authorization: Digest username="0355558888", realm="MY.SER.IP.ADDRESS", algorithm=MD5, uri="sip:056708077771111@MY.AS5300.IP.ADDRESS:5060", nonce="45c9470e4c66d95af025624109fe107c5c292604", response="f615ca4b679b290671315e85cbba0388", opaque="" Content-Length: 0
Feb 7 03:22:47.637: %VOIPAAA-5-VOIP_CALL_HISTORY: CallLegType 2, ConnectionId 452AF2D8 B59111DB A7A28749 8A4F7B28, SetupTime 12:22:27.293 JST Wed Feb 7 2007, PeerAddress 0355558888, PeerSubAddress , DisconnectCause 10 , DisconnectText normal call clearing (16), ConnectTime 12:22: 34.383 JST Wed Feb 7 2007, DisconnectTime 12:22:47.627 JST Wed Feb 7 2007, CallOrigin 2, ChargedUnits 0, InfoType 2, TransmitPackets 626, TransmitBytes 100160, ReceivePackets 949, ReceiveBytes 151840 Feb 7 03:22:47.641 : %VOIPAAA-5-VOIP_CALL_HISTORY: CallLegType 1, ConnectionId 452AF2D8 B59111DB A7A28749 8A4F7B28, SetupTime 12:22:27.371 JST Wed Feb 7 2007, PeerAddress 056708077771111, PeerSubAddress , DisconnectCause 10 , DisconnectText normal call clearing (16), ConnectTime 12:22: 34.381 JST Wed Feb 7 2007, DisconnectTime 12:22:47.641 JST Wed Feb 7 2007, CallOrigin 1, ChargedUnits 0, InfoType 2, TransmitPackets 949, TransmitBytes 151840, ReceivePackets 626, ReceiveBytes 100160
Feb 7 03:22:47.645: Sent: SIP/2.0 200 OK Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=z9hG4bK1e7f.d4c7e994.0,SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS:5060;branch=z9hG4bK02d74e09;rport=5060 From: "12" < sip:0355558888@MY.SER.IP.ADDRESS>;tag=as2ad98fe4 To: sip:08077771111@MY.SER.IP.ADDRESS;tag=28713870-2583 Date: Wed, 07 Feb 2007 03:22:47 GMT Call-ID: 351d8bb44819a06a4ad0ee7730518ea6@MY.SER.IP.ADDRESS Server: Cisco-SIPGateway/IOS-12.x Content-Length: 0 CSeq: 104 BYE
Feb 7 03:22:47.645: Received: BYE sip:056708077771111@MY.AS5300.IP.ADDRESS:5060 SIP/2.0 Record-Route: sip:MY.SER.IP.ADDRESS;ftag=as2ad98fe4;lr Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=z9hG4bK1e7f.d4c7e994.0 Via: SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS :5060;branch=z9hG4bK02d74e09;rport=5060 From: "12" sip:0355558888@MY.SER.IP.ADDRESS;tag=as2ad98fe4 To: < sip:08077771111@MY.SER.IP.ADDRESS>;tag=28713870-2583 Call-ID: 351d8bb44819a06a4ad0ee7730518ea6@MY.SER.IP.ADDRESS CSeq: 104 BYE User-Agent: Asterisk Max-Forwards: 16 Remote-Party-ID: "12" <sip:0355558888@MY.SER.IP.ADDRESS
;privacy=off;screen=no
Proxy-Authorization: Digest username="0355558888", realm="MY.SER.IP.ADDRESS", algorithm=MD5, uri="sip:056708077771111@MY.AS5300.IP.ADDRESS:5060", nonce="45c9470e4c66d95af025624109fe107c5c292604", response="f615ca4b679b290671315e85cbba0388", opaque="" Content-Length: 0
Feb 7 03:22:47.649: Sent: SIP/2.0 200 OK Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=z9hG4bK1e7f.d4c7e994.0,SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS:5060;branch=z9hG4bK02d74e09;rport=5060 From: "12" < sip:0355558888@MY.SER.IP.ADDRESS>;tag=as2ad98fe4 To: sip:08077771111@MY.SER.IP.ADDRESS;tag=28713870-2583 Date: Wed, 07 Feb 2007 03:22:47 GMT Call-ID: 351d8bb44819a06a4ad0ee7730518ea6@MY.SER.IP.ADDRESS Server: Cisco-SIPGateway/IOS-12.x Content-Length: 0 CSeq: 104 BYE
----------------------------------------------------------------------
**************************************************** old message was deleted. (size too big) ****************************************************
Hi,
rport missing is no problem at all, default 5060 is then used. The branch=0 in the ACK might be the problem (if Cisco does not match it with the INVITE (but then it should retransmit the 200 OK reply)).
You can try add syn_branch=0 to the ser.cfg to have the branch id calculated for ACKs too.
Michal
On Wed, 2007-02-07 at 13:02 +0900, Sahria Hao wrote:
I got an additional SIP message log from my 5300.
Scenario:
[UA] => [Asterisk] => [SER] => [CISCO AS5300] => [PSTN]
[UA] "12" [Asterisk] 0355558888@MY.ASTERISK.IP.ADDRESS [SER] MY.SER.IP.ADDRESS [CISCO AS5300] MY.AS5300.IP.ADDRESS [PSTN] T1 Line
And maybe I found little bad Via header in ACK message from Asterisk (via SER) to AS5300.
Feb 7 03:22:34.401: Received: ACK sip:056708077771111@MY.AS5300.IP.ADDRESS:5060 SIP/2.0 Record-Route: sip:MY.SER.IP.ADDRESS;ftag=as2ad98fe4;lr Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=0 Via: SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS:5060;branch=z9hG4bK0a0daaf9;rport=5060 ...
Why Via header looks like no branch value and port value...? And all SIP messages have no Route header.
I attached AS5300 SIP message log (see below).
Any ideas?
Sahria
You may see some hint in the log of Cisco AS if you enable more detailed debug, for example: debug sip all debug voip ccapi inout
Just be prepared for the huge about of log and system slowdown!
Miklos
Michal Matyska wrote:
Hi,
rport missing is no problem at all, default 5060 is then used. The branch=0 in the ACK might be the problem (if Cisco does not match it with the INVITE (but then it should retransmit the 200 OK reply)).
You can try add syn_branch=0 to the ser.cfg to have the branch id calculated for ACKs too.
Michal
On Wed, 2007-02-07 at 13:02 +0900, Sahria Hao wrote:
I got an additional SIP message log from my 5300.
Scenario:
[UA] => [Asterisk] => [SER] => [CISCO AS5300] => [PSTN]
[UA] "12" [Asterisk] 0355558888@MY.ASTERISK.IP.ADDRESS [SER] MY.SER.IP.ADDRESS [CISCO AS5300] MY.AS5300.IP.ADDRESS [PSTN] T1 Line
And maybe I found little bad Via header in ACK message from Asterisk (via SER) to AS5300.
Feb 7 03:22:34.401: Received: ACK sip:056708077771111@MY.AS5300.IP.ADDRESS:5060 SIP/2.0 Record-Route: sip:MY.SER.IP.ADDRESS;ftag=as2ad98fe4;lr Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=0 Via: SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS:5060;branch=z9hG4bK0a0daaf9;rport=5060 ...
Why Via header looks like no branch value and port value...? And all SIP messages have no Route header.
I attached AS5300 SIP message log (see below).
Any ideas?
Sahria
Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Hi Michel,
Thank you for your advice.
And finally I successed to get BYE message from Cisco AS 5300! :-)
Cisco setting as follows...
MYAS5300#show run Building configuration... (omitted) ! voice call disc-pi-off voice call carrier capacity active voice rtp send-recv ! (omitted)
Here is an grobal configuration for 5300 voice service. And I have no change for my ser.cfg. (I appreciate for your advice, thanks Michel)
So my SER and AS 5300 call scenario makes BYE each other when call is done (hooked on).
Very thanks. Sahria
2007/2/7, Miklos Tirpak miklos@iptel.org:
You may see some hint in the log of Cisco AS if you enable more detailed debug, for example: debug sip all debug voip ccapi inout
Just be prepared for the huge about of log and system slowdown!
Miklos
Michal Matyska wrote:
Hi,
rport missing is no problem at all, default 5060 is then used. The branch=0 in the ACK might be the problem (if Cisco does not match it with the INVITE (but then it should retransmit the 200 OK reply)).
You can try add syn_branch=0 to the ser.cfg to have the branch id calculated for ACKs too.
Michal
On Wed, 2007-02-07 at 13:02 +0900, Sahria Hao wrote:
I got an additional SIP message log from my 5300.
Scenario:
[UA] => [Asterisk] => [SER] => [CISCO AS5300] => [PSTN]
[UA] "12" [Asterisk] 0355558888@MY.ASTERISK.IP.ADDRESS [SER] MY.SER.IP.ADDRESS [CISCO AS5300] MY.AS5300.IP.ADDRESS [PSTN] T1 Line
And maybe I found little bad Via header in ACK message from Asterisk (via SER) to AS5300.
Feb 7 03:22:34.401: Received: ACK sip:056708077771111@MY.AS5300.IP.ADDRESS:5060 SIP/2.0 Record-Route: sip:MY.SER.IP.ADDRESS;ftag=as2ad98fe4;lr Via: SIP/2.0/UDP MY.SER.IP.ADDRESS;branch=0 Via: SIP/2.0/UDP MY.ASTERISK.IP.ADDRESS:5060;branch=z9hG4bK0a0daaf9;rport=5060 ...
Why Via header looks like no branch value and port value...? And all SIP messages have no Route header.
I attached AS5300 SIP message log (see below).
Any ideas?
Sahria
Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers