Hi List!
I have a problem with a sip provider, sending sip MESSAGE messages without a good reason. I don’t know how I could handle them in a way that the provider is happy with it. The problem is that when asterisk sends him the 415 error he just sends me a BYE next.
I am calling an ISDN number through the provider and the messages in question seems to be charge information. I tried to turn it off on the providers side, but there is no way to suppress it.
Here is the way it goes. First I get an OPTIONS request from the other side, asking for the options for the extension the provider issued to me, but at my host. I added myself to my extensions.conf this way:
[options]
exten => PROVIDER_NUMBER,1,NoOp()
Now the proxy get’s some OPTIONS for this pair, but definitly not indicating MESSAGE capabilties.
<-- SIP read from 212.144.24.38:5060:
OPTIONS sip:PROVIDER_NUMBER@MY_HOST_IP SIP/2.0
Via: SIP/2.0/UDP 212.144.24.38:5060;branch=z9hG4bKlct5k81080u1uocqe 341sh00000l1.1
To: “MY_NAME” sip:PROVIDER_NUMBER@VORWAHL.sip.arcor.de;tag=as58e5 b2dd
From: sip:CALLED_NUMBER@VORWAHL.sip.arcor.de;ta g=SD6trua99-0d80bc15
Call-ID: 0b551c9a39a78edd7c9efc0953a9b143@VORWAHL.sip.arcor .de
CSeq: 106 OPTIONS
Max-Forwards: 69
Content-Length: 0
Looking for PROVIDER_NUMBER in default (domain MY_HOST_IP)
Transmitting (no NAT) to 212.144.24.38:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 212.144.24.38:5060;branch=z9hG4bKlct5k81080u1uocqe 341sh00000l1.1;received=212.144.24.38
From: sip:CALLED_NUMBER@VORWAHL.sip.arcor.de;ta g=SD6trua99-0d80bc15
To: “MY_NAME” sip:PROVIDER_NUMBER@VORWAHL.sip.arcor.de;tag=as58e5 b2dd
Call-ID: 0b551c9a39a78edd7c9efc0953a9b143@VORWAHL.sip.arcor .de
CSeq: 106 OPTIONS
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:PROVIDER_NUMBER@MY_HOST_IP
Accept: application/sdp
Content-Length: 0
Anyway, the other side sends us this a few moments later.
<-- SIP read from 212.144.24.38:5060:
MESSAGE sip:PROVIDER_NUMBER@MY_HOST_IP SIP/2.0
Via: SIP/2.0/UDP 212.144.24.38:5060;branch=z9hG4bKlct5k81080u1uocqe 341sn0000gl1.1
To: “MY_NAME” sip:PROVIDER_NUMBER@VORWAHL.sip.arcor.de;tag=as58e5 b2dd
From: sip:CALLED_NUMBER@VORWAHL.sip.arcor.de;ta g=SD6trua99-0d80bc15
Call-ID: 0b551c9a39a78edd7c9efc0953a9b143@VORWAHL.sip.arcor .de
CSeq: 107 MESSAGE
Max-Forwards: 69
P-AoC: Info, type=AOC-D
Content-Type: ASN1/aoc
Content-Length: 20
Transmitting (no NAT) to 212.144.24.38:5060:
SIP/2.0 415 Unsupported Media Type
Via: SIP/2.0/UDP 212.144.24.38:5060;branch=z9hG4bKlct5k81080u1uocqe 341sn0000gl1.1;received=212.144.24.38
From: sip:CALLED_NUMBER@VORWAHL.sip.arcor.de;ta g=SD6trua99-0d80bc15
To: “MY_NAME” sip:PROVIDER_NUMBER@VORWAHL.sip.arcor.de;tag=as58e5 b2dd
Call-ID: 0b551c9a39a78edd7c9efc0953a9b143@VORWAHL.sip.arcor .de
CSeq: 107 MESSAGE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0
X-Asterisk-HangupCause: Normal Clearing
Afterwards I just get a bye from the other side.
Is asterisk causing this hangup, or is it by the the proxy? Is there a way to make asterisk answer 200 OK and redirect the MESSAGE to /dev/null or somewhere?
Is it an error on the proxy side to send the MESSAGE after receiving the correct OPTIONS - or is there an error in the communication that I can’t spot and that makes it impossible for the proxy to get it right?
Any ideas?
The pbx is running on Debian Etch with version 1.2.13.
Cheers,
Hein
This patch also works for Alice.