Hi all,

Today I've stumbled upon a very strange behaviour with an analog fxs/fxo
gateway (AddPac AP1002, http://www.addpac.com/english/AP1002.html)
connected to a CVS HEAD(from today) Asterisk server. This manifested itself after enabling the CallerID on the pstn lines connected to the FXO ports of the module. Both FXO modules have their own sip username/passwords and are registered to the asterisk box in question, same with the fxs ports on the same device. All of them register from the same ip:port combination.

With caller-id disabled, whenever a call comes from pstn to one of the
pstn lines, the line is picked up and immediately dialed into an
extension on the asterisk box (an ivr menu). Call is authenticated and
call flow is ok. For the sake of bandwidth conservation I'm including
only the SIP INVITE, I'll post full debug if it's required on request.

the sip entry for the FXO port is as follows:

[582760]
type=friend
username=582760
secret=xxxxxx
host=dynamic
qualify=yes

the sip invite without the caller-id enabled:

INVITE sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 195.250.76.28:5060;branch=z9hG4bK8d423c2ca428
From: <sip:[EMAIL PROTECTED]>;tag=8d423c2ca4
To: <sip:[EMAIL PROTECTED]>
Call-ID: [EMAIL PROTECTED]
CSeq: 28 INVITE
Supported: timer, replaces
Min-SE: 1800
Date: Mon, 25 Jul 2005 15:04:45 GMT
User-Agent: AddPac SIP Gateway
Contact: <sip:[EMAIL PROTECTED]>
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REFER, NOTIFY, INFO
Content-Type: application/sdp
Content-Length: 237
Max-Forwards: 70

v=0
o=582760 1122303885 1122303885 IN IP4 195.250.76.28
s=AddPac Gateway SDP
c=IN IP4 195.250.76.28
t=1122303885 0
m=audio 23026 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20

Now, if I enable the callerid for that port, the caller gets identified,
and the following SIP INVITE is sent to the server:

INVITE sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 195.250.76.28:5060;branch=z9hG4bKd8424c26a424
From: <sip:[EMAIL PROTECTED]>;tag=d8424c26a4
To: <sip:[EMAIL PROTECTED]>
Call-ID: [EMAIL PROTECTED]
CSeq: 24 INVITE
Supported: timer, replaces
Min-SE: 1800
Date: Mon, 25 Jul 2005 15:01:44 GMT
User-Agent: AddPac SIP Gateway
Contact: <sip:[EMAIL PROTECTED]>
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, REFER, NOTIFY, INFO
Content-Type: application/sdp
Content-Length: 240
Max-Forwards: 70

v=0
o=010527911 1122303704 1122303704 IN IP4 195.250.76.28
s=AddPac Gateway SDP
c=IN IP4 195.250.76.28
t=1122303704 0
m=audio 23022 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20


Note the "From" tag:
From: <sip:[EMAIL PROTECTED]>;tag=d8424c26a4

So here it is: it uses the detected caller-id instead of the FXO's
username. Still, later on the auth challenge step it resends the invite
with the proper auth info:
Proxy-Authorization: Digest username="582760", realm="sip.arminco.com",
nonce="1886728b", uri="sip:[EMAIL PROTECTED]",
response="487250bb2f1f17a8b15e9ad727e87a6f", algorithm=MD5

..asterisk rejects the call with Failed auth on [EMAIL PROTECTED] :(

Is there a limitation in Asterisk and it uses the "From" address as the
auth user? This seems buggy.. I'll send the full debugs off-list if
someone is interested.

regards,
Vahan

begin:vcard
fn:Vahan Yerkanian
n:Yerkanian;Vahan
org:ARMINCO Global Telecommunications;Head, Research & Development dept.
adr:;;28, Isahakian ave., PO BOX 10;Yerevan;;375009;Armenia
email;internet:[EMAIL PROTECTED]
x-mozilla-html:FALSE
url:http://www.arminco.com/
version:2.1
end:vcard

_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to