Phone A ---------> PBX <------------Asterisk <-------Phone B
Hello guys,
so here is the situation: I use asterisk to register at a sip-proxy (test.abs.ntx) that has the domain abc.com. This works fine. Phone A works (inbound and outbound calls possible), whereas Phone B only works for inbound calls. Phone B’s outbound calls get rejected by the PBX, because of authentication problems (Status 407 Proxy Authenticication Required). Comparing Phone A’s and Phone B’s sip invite messages (via wireshark) shows, that Phone A requests a line at abc.com, whereas Phone B requests a line at test.abs.ntx (first line in Phone A’s Invite and Phone B’s Invite code section see below). So my assumption is, that the authenticication error is only a result of the different line requests and not a root-cause itself. And finally the question:
What do I need to do, to change Phone B’s request-line to abc.com? My guess is, that I messed up the sip.conf.
Phone A’s Register:
REGISTER sip:abc.com SIP/2.0
Authorization: Digest username="Milchmann_N",realm="abc.com",nonce="fe3680a8e909d311",response="db1582fc8735db4fd25ca310a311038b",uri="sip:abc.com",qop=auth,cnonce="bdc2cd94e909d311",nc=00000002,algorithm=MD5
Via: SIP/2.0/UDP 10.124.239.42:5060;branch=z9hG4bK-B318A8EB;rport
From: <sip:Milchmann_N@abc.com>;epid=0050c26a5027;tag=3365402349
To: <sip:Milchmann_N@abc.com>
Call-ID: b4930e8ae909d311ad660050c26a5027@10.124.239.42
CSeq: 1040 REGISTER
Contact: <sip:Milchmann_N@10.124.239.42:5060;transport=UDP>;expires=120
Content-Length: 0
Expires: 120
Max-Forwards: 70
User-Agent: (innovaphone IP150/9.00 hotfix31 [9.061333/9061333/101])
Allow-Events: reg,dialog,message-summary,presence
Phone B’s Register:
REGISTER sip:abc.com SIP/2.0
Via: SIP/2.0/UDP 10.124.239.47:60346;branch=z9hG4bK265bcd76;rport
From: <sip:IP3_Sample1@abc.com>;tag=as45d15dcd
To: <sip:IP3_Sample1@abc.com>
Call-ID: 07d272883df27db63a193b5b6ba99d62@127.0.0.1
CSeq: 102 REGISTER
User-Agent: PhoneIP
Max-Forwards: 70
Expires: 300
Contact: <sip:301@10.124.239.47:60346>
Event: registration
Content-Length: 0
Phone A’s Invite:
[code]INVITE sip:301@abc.com;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.124.239.42:5060;branch=z9hG4bK-B318A8EC;rport
From: sip:Milchmann_N@abc.com;epid=0050c26a5027;tag=3365402350
To: sip:301@abc.com;user=phone
Call-ID: 18372b47e909d311ad660050c26a5027@10.124.239.42
CSeq: 6160440 INVITE
Contact: sip:Milchmann_N@10.124.239.42:5060;transport=UDP
Allow: REGISTER,SUBSCRIBE,NOTIFY,INVITE,ACK,PRACK,OPTIONS,BYE,CANCEL,REFER,INFO,UPDATE,PUBLISH
Content-Length: 256
Content-Type: application/sdp
Max-Forwards: 63
Supported: 100rel,replaces,privacy,timer,from-change,histinfo,answermode
User-Agent: (innovaphone IP150/9.00 hotfix31 [9.061333/9061333/101])
P-Preferred-Identity: sip:164@abc.com;user=phone
P-Sig-Options: Overlap-Dialing
v=0
o=- 5 1 IN IP4 10.124.239.42
s=-
t=0 0
m=audio 16394 RTP/AVP 18 4 8 0 101 13
c=IN IP4 10.124.239.42
a=rtpmap:101 telephone-event/8000
a=fmtp:18 annexa=yes
a=fmtp:18 annexb=no
a=fmtp:101 0-15
a=ptime:60
a=silenceSupp:off - - - -
a=sendrecv[/code]
Phone B’s Invite:
[code]INVITE sip:164@test.abs.ntx:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.124.239.47:60346;branch=z9hG4bK4e699522;rport
From: “Phone IP” sip:IP3_Sample1@abc.com;tag=as1da1cf97
To: sip:164@test.abs.ntx:5060;user=phone
Contact: sip:IP3_Sample1@10.124.239.47:60346
Call-ID: 1abc3dda5fb802eb035a1f755e62ab3c@abc.com
CSeq: 104 INVITE
User-Agent: PhoneIP
Max-Forwards: 70
Proxy-Authorization: Digest username=“IP3_Sample1”, realm=“abc.com”, algorithm=MD5, uri=“sip:164@test.abs.ntx:5060;user=phone”, nonce=“fe3680a8e909d311”, response=“c4e5a66511a2dc19402bccb3bf60306f”, qop=auth, cnonce=“44dd240b”, nc=00000001
Date: Mon, 01 Jan 2007 00:42:16 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Type: application/sdp
Content-Length: 266
v=0
o=root 18488 18490 IN IP4 10.124.239.47
s=session
c=IN IP4 10.124.239.47
t=0 0
m=audio 10600 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=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
[/code]
Sip.conf
[general]
register=>IP3_Sample1@abc.com:IP3@test.abs.ntx:5060/301
registerattempts=3
registertimeout=5
language=en
pedantic=yes
usereqphone=yes
useragent=PhoneIP
srvlookup=no
allowguest=yes
bindport=60346
context=active
disallow=all
allow=alaw,ulaw
realm=abc.com
[to_sip_proxy]
type=peer
context=incoming
fromdomain=abc.com
fromuser=IP3_Sample1
host=test.abs.ntx
dtmfmode=rfc2833
disallow=all
allow=alaw,ulaw
username=IP3_Sample1
secret=IP3
insecure=invite
canreinvite=yes
port=5060
[301]
type=peer
context=outgoing
username=onboard
callerid="IP3_Sample1" <301>
host=dynamic
dtmfmode=rfc2833
qualify=100
disallow=all
allow=alaw,ulaw
canreinvite=no
port=60348
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.0.0.0
extension.conf
[outgoing]
include => test
include => dial_from_phoneapp
[dial_from_phoneapp]
include => speeddial
include => parkedcalls
exten => ${PHONENUMBER},1,Hangup(403)
exten => _X.,1,Verbose(Outgoing Call form ${CALLERID(name)} to SIP/${EXTEN}@to_sip_proxy.)
exten => _X.,n,Set(GLOBAL(REDIALING)=${EXTEN})
exten => _X.,n,ExecIf($["${atx}" = "on"],Dial,SIP/${EXTEN}@to_sip_proxy,,gHKT)
exten => _X.,n,ExecIf($["${atx}" = "off"],Dial,SIP/${EXTEN}@to_sip_proxy,,gH)
exten => _X!,1,Verbose(Outgoing Call form ${CALLERID(name)} to SIP/${EXTEN}@to_sip_proxy.)
exten => _X!,n,Set(GLOBAL(REDIALING)=${EXTEN})
exten => _X!,n,ExecIf($["${atx}" = "on"],Dial,SIP/${EXTEN}@to_sip_proxy,,gHKT)
exten => _X!,n,ExecIf($["${atx}" = "off"],Dial,SIP/${EXTEN}@to_sip_proxy,,gH)
Thx for your help.
Henning