[OpenSIPS-Users] Calls from Asterisk gateway not allowed...
Michele Pinassi
michele.pinassi at unisi.it
Fri Jun 1 10:15:06 CEST 2012
Hi all,
i'm trying to integrate OpenSIPS with a PSTN gateway with Asterisk.
Here's the scenario:
{VOIP NET}---[OPENSIPS]---[ASTERISK]----{PSTN}
Calls between phones in VOIP NET and from VOIP to PSTN works as expected
but i have problems with calls from PSTN.
Here's the Asterisk log:
....
-- Executing [s at from-pstn:9] Dial("DAHDI/1-1",
"SIP/2617 at voip-trunk") in new stack
== Using SIP RTP CoS mark 5
-- Called 2617 at voip-trunk
[Jun 1 10:03:40] NOTICE[2280]: chan_sip.c:17982 handle_response_invite:
Failed to authenticate on INVITE to '"asterisk"
<sip:asterisk at voip.unisi.it>;tag=as35df4185'
and this is the Voip trunk from Asterisk (172.20.0.5) to OpenSIPS
(172.20.0.1):
[voip-trunk]
type=peer
fromdomain=voip.unisi.it
host=172.20.0.1
On the OpenSIPS side the log says:
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_msg: SIP Request:
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_msg: method: <INVITE>
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_msg: uri: <sip:2617 at 172.20.0.1>
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_msg: version: <SIP/2.0>
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_headers: flags=2
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_via_param: found param type 232, <branch> =
<z9hG4bK0b0e13b5>; state=6
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_via_param: found param type 235, <rport> = <n/a>; state=17
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_via: end of header reached, state=5
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_headers: via found, flags=2
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_headers: this is the first via
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:receive_msg: After parse_msg...
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:receive_msg: preparing to run routing scripts...
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_headers: flags=100
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:maxfwd:is_maxfwd_present: value = 70
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_headers: flags=8
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_to: end of header reached, state=10
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_to: display={}, ruri={sip:2617 at 172.20.0.1}
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:get_hdr_field: <To> [23]; uri=[sip:2617 at 172.20.0.1]
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:get_hdr_field: to body [<sip:2617 at 172.20.0.1>#015#012]
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:uri:has_totag: no totag
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_headers: flags=78
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:get_hdr_field: cseq <CSeq>: <102> <INVITE>
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:tm:t_lookup_request: start searching: hash=36800, isACK=0
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:tm:matching_3261: RFC3261 transaction matching failed
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:tm:t_lookup_request: no transaction found
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_to_param: tag=as35df4185
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_to: end of header reached, state=29
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_to: display={"asterisk"}, ruri={sip:asterisk at voip.unisi.it}
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_headers: flags=10000
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:get_hdr_field: content_length=290
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:get_hdr_field: found end of header
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:auth:pre_auth: credentials with given realm not found
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:auth:reserve_nonce_index: second= 9, sec_monit= -1, index= 1
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:auth:build_auth_hf: nonce index= 1
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:auth:build_auth_hf: 'Proxy-Authenticate: Digest
realm="voip.unisi.it",
nonce="4fc877ed000000018780511868efca6c92e5cc23b227d73f"#015#012'
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:parse_headers: flags=ffffffffffffffff
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:check_ip_address: params 172.20.0.5, 172.20.0.5, 0
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:destroy_avp_list: destroying list (nil)
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29956]:
DBG:core:receive_msg: cleaning up
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_msg: SIP Request:
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_msg: method: <ACK>
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_msg: uri: <sip:2617 at 172.20.0.1>
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_msg: version: <SIP/2.0>
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_headers: flags=2
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_via_param: found param type 232, <branch> =
<z9hG4bK0b0e13b5>; state=6
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_via_param: found param type 235, <rport> = <n/a>; state=17
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_via: end of header reached, state=5
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_headers: via found, flags=2
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_headers: this is the first via
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:receive_msg: After parse_msg...
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:receive_msg: preparing to run routing scripts...
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_headers: flags=8
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_to_param: tag=c97b4d1cb1f3d0da549e06a8d482ef63.5412
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_to: end of header reached, state=29
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:parse_to: display={}, ruri={sip:2617 at 172.20.0.1}
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:get_hdr_field: <To> [65]; uri=[sip:2617 at 172.20.0.1]
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:get_hdr_field: to body [<sip:2617 at 172.20.0.1>]
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:sl:sl_filter_ACK: local ACK found -> dropping it!
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:destroy_avp_list: destroying list (nil)
Jun 1 10:05:35 proxy-voip01 /usr/sbin/opensips[29951]:
DBG:core:receive_msg: cleaning up
this is opensips.cfg related to INVITE:
# account only INVITEs
if (is_method("INVITE")) {
if (check_source_address("1")) {
route(1);
setflag(1);
}
}
and this is the dump from "address" table:
root at proxy-voip01:/etc/opensips# opensipsctl address show
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
+----+-----+------------+------+------+-------+----------+--------------+
| id | grp | ip | mask | port | proto | pattern | context_info |
+----+-----+------------+------+------+-------+----------+--------------+
| 1 | 0 | 172.20.0.5 | 32 | 5060 | any | ^sip:.*$ | NULL |
+----+-----+------------+------+------+-------+----------+--------------+
root at proxy-voip01:/etc/opensips#
Any hint ? Thanks, Michele
--
Michele Pinassi
Responsabile Telefonia di Ateneo
Servizio Reti, Sistemi e Sicurezza Informatica - Università degli Studi
di Siena
tel: 0577.(23)2169 - fax: 0577.(23)2053
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.opensips.org/pipermail/users/attachments/20120601/3e9daa08/attachment.pgp>
More information about the Users
mailing list