[asterisk-users] Force Authentication

michel freiha michofr at gmail.com
Thu Jul 2 05:54:59 CDT 2009


Dear Sir,

I have a Patton device registered on an OpenSIPs server...The openSips
Server send the call to asterisk server....When using some end user device
like patton the asterisk server does not send back an Authentication
required packet to INVITE packet received from OS as follow:

<--- SIP read from OpenSIPS_IP:5060 --->
INVITE sip:0473236354 at Asterisk_IP SIP/2.0
Record-Route: <sip:OpenSIPS_IP;lr=on;ftag=724c58b04b>
Via: SIP/2.0/UDP OpenSIPS_IP;branch=z9hG4bK3b3a.4744c247.0
Via: SIP/2.0/UDP 79.132.230.138:5060
;rport=5060;received=79.132.230.138;branch=z9hG4bK1f03f72b9bba41567
Max-Forwards: 69
From: <sip:92968059 at 79.132.230.138:5060>;tag=724c58b04b
To: <sip:0473236354 at OpenSIPS_IP:5060>
Call-ID: 2ef74e533282d7f1
CSeq: 17515 INVITE
Contact: <sip:92968059 at 79.132.230.138:5060;nat=yes>
Supported: replaces
User-Agent: Patton SN4638 5BIS 00A0BA048822 R5.3 2009-01-15 H323 SIP BRI M5T
SIP Stack/4.0.28.28
Content-Type: application/sdp
Content-Length: 241

v=0
o=MxSIP 0 2 IN IP4 OpenSIPS_IP
s=SIP Call
c=IN IP4 OpenSIPS_IP
t=0 0
m=audio 37586 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
a=nortpproxy:yes

<------------->
--- (14 headers 12 lines) ---
Sending to OpenSIPS_IP : 5060 (no NAT)
Using INVITE request as basis request - 2ef74e533282d7f1
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:650 mysql_reconnect:
MySQL RealTime: Everything is fine.
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:138 realtime_mysql: MySQL
RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE name = '92968059'
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:650 mysql_reconnect:
MySQL RealTime: Everything is fine.
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:138 realtime_mysql: MySQL
RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE host = 'OpenSIPS_IP'
AND port = '5060'
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:650 mysql_reconnect:
MySQL RealTime: Everything is fine.
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:138 realtime_mysql: MySQL
RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE ipaddr =
'OpenSIPS_IP' AND port = '5060'
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:650 mysql_reconnect:
MySQL RealTime: Everything is fine.
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:258 realtime_multi_mysql:
MySQL RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE host =
'OpenSIPS_IP' ORDER BY host
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:650 mysql_reconnect:
MySQL RealTime: Everything is fine.
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:258 realtime_multi_mysql:
MySQL RealTime: Retrieve SQL: SELECT * FROM sip_buddies WHERE ipaddr =
'OpenSIPS_IP' ORDER BY ipaddr
Found no matching peer or user for 'OpenSIPS_IP:5060'
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 101
[Jul  2 12:44:20] DEBUG[29275]: chan_sip.c:5249 process_sdp: Peer doesn't
provide T.38 UDPTL
Peer audio RTP is at port OpenSIPS_IP:37586
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8080e (gsm|ulaw|alaw|g726|h263), peer - audio=0xc
(ulaw|alaw)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port OpenSIPS_IP:37586
Looking for 0473236354 in BE (domain Asterisk_IP)
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:650 mysql_reconnect:
MySQL RealTime: Everything is fine.
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:138 realtime_mysql: MySQL
RealTime: Retrieve SQL: SELECT * FROM extensions WHERE exten = '0473236354'
AND context = 'BE' AND priority = '1'
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:650 mysql_reconnect:
MySQL RealTime: Everything is fine.
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:258 realtime_multi_mysql:
MySQL RealTime: Retrieve SQL: SELECT * FROM extensions WHERE exten LIKE
'\\_%' AND context = 'BE' AND priority = '1' ORDER BY exten
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:650 mysql_reconnect:
MySQL RealTime: Everything is fine.
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:138 realtime_mysql: MySQL
RealTime: Retrieve SQL: SELECT * FROM extensions WHERE exten = '0473236354'
AND context = 'BE-Out' AND priority = '1'
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:650 mysql_reconnect:
MySQL RealTime: Everything is fine.
[Jul  2 12:44:20] DEBUG[29275]: res_config_mysql.c:258 realtime_multi_mysql:
MySQL RealTime: Retrieve SQL: SELECT * FROM extensions WHERE exten LIKE
'\\_%' AND context = 'BE-Out' AND priority = '1' ORDER BY exten
list_route: hop: <sip:OpenSIPS_IP;lr=on;ftag=724c58b04b>

<--- Transmitting (no NAT) to OpenSIPS_IP:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
OpenSIPS_IP;branch=z9hG4bK3b3a.4744c247.0;received=OpenSIPS_IP
Via: SIP/2.0/UDP 79.132.230.138:5060
;rport=5060;received=79.132.230.138;branch=z9hG4bK1f03f72b9bba41567
Record-Route: <sip:OpenSIPS_IP;lr=on;ftag=724c58b04b>
From: <sip:92968059 at 79.132.230.138:5060>;tag=724c58b04b
To: <sip:0473236354 at OpenSIPS_IP:5060>
Call-ID: 2ef74e533282d7f1
CSeq: 17515 INVITE
User-Agent:
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:0473236354 at Asterisk_IP>
Content-Length: 0

Please note that if we use linksys as end user SIP device everything looks
fine...Even if we register patton on asterisk directly the authentication is
successfully done by asterisk

regards

On Mon, Jun 29, 2009 at 6:06 PM, Alex Balashov <abalashov at evaristesys.com>wrote:

> It does this by default unless you have allowguest set to yes, and/or
> any insecure parameter options on any individual peers.
>
> --
> Sent from mobile device
>
> On Jun 29, 2009, at 10:33 AM, michel freiha <michofr at gmail.com> wrote:
>
> > Hi all,
> >
> > i would like to ask please about how to force asterisk to ask for
> > authentication when receiving an INVITE packet from any device?
> >
> > Regards
> > _______________________________________________
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >   http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090702/4f09e863/attachment-0001.htm 


More information about the asterisk-users mailing list