Got SIP response 405 "Method Not Allowed"

Unable to register with my outbound provider, here is debug for my provider ip. Getting error 405 “Method Not Allowed”.

XXX.XXX.XXX.XXX => provider IP
YYY.YYY.YYY>YYY =>my server IP.

Best regards,

AL

[Jan 31 23:30:23] NOTICE[2423]: chan_sip.c:7588 sip_reregister: – Re-registration for my_user_name@sip.my_provider.com
REGISTER 12 headers, 0 lines
Reliably Transmitting (NAT) to xxx.xxx.xxx.xxx:5060:
REGISTER sip:sip.my_provider.com SIP/2.0
Via: SIP/2.0/UDP YYY.YYY.YYY.YYY:5060;branch=z9hG4bK3b34ecc7;rport
From: sip:my_user_name@sip.my_provider.com;tag=as61a1ec5c
To: sip:my_user_name@sip.my_provider.com
Call-ID: 68266b317da0600c2dcde741755ede74@127.0.0.2
CSeq: 102 REGISTER
User-Agent: Asterisk PBX
Max-Forwards: 70
Expires: 240
Contact: sip:s@YYY.YYY.YYY.YYY
Event: registration
Content-Length: 0


<— SIP read from xxx.xxx.xxx.xxx:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP YYY.YYY.YYY.YYY:5060;branch=z9hG4bK3b34ecc7;received=YYY.YYY.YYY.YYY;rport=5060
From: sip:my_user_name@sip.my_provider.com;tag=as61a1ec5c
To: sip:my_user_name@sip.my_provider.com;tag=gss6a9c9883a5f434114cb028fc3aebc4cf
Call-ID: 68266b317da0600c2dcde741755ede74@127.0.0.2
CSeq: 102 REGISTER
Server: My_provider UAS v110.08
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
Contact: sip:s@YYY.YYY.YYY.YYY
Date: Sun, 01 Feb 2009 05:30:23 GMT
Content-Length: 0

<------------->
— (11 headers 0 lines) —
Scheduling destruction of SIP dialog ‘68266b317da0600c2dcde741755ede74@127.0.0.2’ in 32000 ms (Method: REGISTER)
[Jan 31 23:30:24] NOTICE[2423]: chan_sip.c:12776 handle_response_register: Outbound Registration: Expiry for sip.my_provider.com is 240 sec (Scheduling reregistration in 225 s)
Scheduling destruction of SIP dialog '2510cde35a754348209ebfbf31b9080d@YYY.YYY.YYY.YYY’ in 32000 ms (Method: NOTIFY)
Reliably Transmitting (NAT) to xxx.xxx.xxx.xxx:5060:
NOTIFY sip:my_user_name@sip.my_provider.com SIP/2.0
Via: SIP/2.0/UDP YYY.YYY.YYY.YYY:5060;branch=z9hG4bK178dc667;rport
From: “asterisk” sip:my_user_name@YYY.YYY.YYY.YYY;tag=as75943980
To: sip:my_user_name@sip.my_provider.com
Contact: sip:my_user_name@YYY.YYY.YYY.YYY
Call-ID: 2510cde35a754348209ebfbf31b9080d@YYY.YYY.YYY.YYY
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX
Max-Forwards: 70
Event: message-summary
Content-Type: application/simple-message-summary
Content-Length: 89

Messages-Waiting: no
Message-Account: sip:9850@YYY.YYY.YYY.YYY
Voice-Message: 0/0 (0/0)


sip*CLI>
<— SIP read from xxx.xxx.xxx.xxx:5060 —>
SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP YYY.YYY.YYY.YYY:5060;branch=z9hG4bK178dc667
From: “asterisk” sip:my_user_name@YYY.YYY.YYY.YYY;tag=as75943980
To: sip:my_user_name@sip.my_provider.com;tag=fegss
Call-ID: 2510cde35a754348209ebfbf31b9080d@YYY.YYY.YYY.YYY
CSeq: 102 NOTIFY
Server: My_provider UAS v110.08
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
Contact: sip:xxx.xxx.xxx.xxx
Accept: application/sdp
Content-Length: 0

<------------->
— (11 headers 0 lines) —
– Got SIP response 405 “Method Not Allowed” back from xxx.xxx.xxx.xxx
Really destroying SIP dialog '2510cde35a754348209ebfbf31b9080d@YYY.YYY.YYY.YYY’ Method: NOTIFY
Really destroying SIP dialog ‘68266b317da0600c2dcde741755ede74@127.0.0.2’ Method: REGISTER
sip*CLI>

It looks like you have the [type] attribute in your SIP.conf setup as “friend” or “user”. Try switching it to “peer”

type=peer

The NOTIFY method is used to let a SIP user agent know information… it looks like this one is sending the message-waiting information (or voicemail).

Let me know if that helps.

also… check to make sure you don’t have the [mailbox] attribute specified. I don’t think it will send NOTIFY with type=peer, but it’s worth double checking.

Hello,

Did not work, still getting same error, but I am able to make call with my provider. SIP SHOW PEERS show that I am reguster with them.

Any other sugestion

AL

Do a sip show peer
and post it here changing just teh relevent security sections , It looks like MWI is defined , also check th evoicemail.conf to make sure no entry there.

Ian

Name/username Host Dyn Nat ACL Port Status
Incoming Prov 99.999.99.900 5060 Unmonitored
international/user_name 99.992.912.13 5060 Unmonitored
1060/1060 99.998.98.999 D N 5060 Unmonitored
1050/1050 (Unspecified) D N 0 Unmonitored
1000/1000 68.15.197.211 D N 5060 Unmonitored
5 sip peers [Monitored: 0 online, 0 offline Unmonitored: 4 online, 1 offline]

I do not have evoicemail.conf file

Regards,

Al

hi

i meant voicemail.conf it was a typo and

sip show peer
not
sip show peers

Ian

Sorry here is:

  • Name : Provider
    Secret :
    MD5Secret :
    Context : DID_provider
    Subscr.Cont. :
    Language : es
    AMA flags : Unknown
    Transfer mode: open
    CallingPres : Presentation Allowed, Not Screened
    FromUser : user name
    Callgroup : 1
    Pickupgroup : 1
    Mailbox : provider
    VM Extension : 9998
    LastMsgsSent : 0/0
    Call limit : 0
    Dynamic : No
    Callerid : “New User” <>
    MaxCallBR : 384 kbps
    Expire : -1
    Insecure : no
    Nat : RFC3581
    ACL : No
    T38 pt UDPTL : No
    CanReinvite : No
    PromiscRedir : No
    User=Phone : No
    Video Support: No
    Trust RPID : No
    Send RPID : No
    Subscriptions: Yes
    Overlap dial : No
    DTMFmode : rfc2833
    LastMsg : 0
    ToHost : sip.provider.com
    Addr->IP : 99.99.999.999 Port 5060
    Defaddr->IP : 0.0.0.0 Port 0
    Def. Username: user name
    SIP Options : (none)
    Codecs : 0xe (gsm|ulaw|alaw)
    Codec Order : (ulaw:20,alaw:20,gsm:20)
    Auto-Framing: No
    Status : Unmonitored
    Useragent :
    Reg. Contact :

here is the voicemail.conf

format=wav49|gsm|wav
serveremail=asterisk
attach=yes
skipms=3000
maxsilence=10
silencethreshold=128
maxlogins=3
emaildateformat=%A, %B %d, %Y at %r
sendvoicemail=yes
maxgreet=
operator=no
maxmsg=25
maxmessage=120
minmessage=0
saycid=yes
sayduration=no
envelope=yes
review=yes

  • Name : Provider
    Secret :
    MD5Secret :
    Context : DID_provider
    Subscr.Cont. :
    Language : es
    AMA flags : Unknown
    Transfer mode: open
    CallingPres : Presentation Allowed, Not Screened
    FromUser : user name
    Callgroup : 1
    Pickupgroup : 1
    Mailbox : provider <<<<<<<<<<Here is the offender
    VM Extension : 9998<<<<<<<<<And here

    LastMsgsSent : 0/0
    Call limit : 0
    Dynamic : No
    Callerid : “New User” <>
    MaxCallBR : 384 kbps
    Expire : -1
    Insecure : no
    Nat : RFC3581
    ACL : No
    T38 pt UDPTL : No
    CanReinvite : No
    PromiscRedir : No
    User=Phone : No
    Video Support: No
    Trust RPID : No
    Send RPID : No
    Subscriptions: Yes
    Overlap dial : No
    DTMFmode : rfc2833
    LastMsg : 0
    ToHost : sip.provider.com
    Addr->IP : 99.99.999.999 Port 5060
    Defaddr->IP : 0.0.0.0 Port 0
    Def. Username: user name
    SIP Options : (none)
    Codecs : 0xe (gsm|ulaw|alaw)
    Codec Order : (ulaw:20,alaw:20,gsm:20)
    Auto-Framing: No
    Status : Unmonitored
    Useragent :
    Reg. Contact :[/i]

Thx How do I configure other users to have mail box? Provider user does not have mail box setup, takes from general section on my users.conf.

Regards
AL

Resolved, Had remove hasvoicemail=yes from the general section of the user.conf and add to each user’s.conf section, also had hasvoicemail=no on my provider section.

Regards to all

Al