I’m using chan_sip, as opposed to chan_pjsip. CLI module show like chan_sip shows one module loaded; the same for chan_pjsip shows zero modules.
My D40 phone is at firmware level 1_4_0_0_57389 and has 15 ringtones built in. The default one is Digium. If I use the phone’s web interface to change the default ringtone to Office, for example, and call the phone, I get the annoying Cisco-sounding ringtone (no offence to Cisco; they are good in their market; it just sounded like the phones at the last place I was laid off from).
BTW, I don’t have DPMA installed, and I am still manually configuring the phone using the phone’s web interface. I plan to use XML configuration, once I get to the point where I know what to configure. At this point, I have only one Digium phone, used for testing. I have soft SIP phones, running on laptops, that I use to call into the Digium phone.
I updated my dialplan (extensions.conf) to contain the following snippet:
; Dial out to Digium D40 phone, Line 1
exten => 401,1,NoOp()
same => n,SipAddHeader("Alert-Info: ")
same => n,Dial(SIP/D40Line1,10)
same => n,GotoIf($[${DIALSTATUS} = “BUSY”]?busy:unavail)
same => n(unavail),Voicemail(401@CharleysHouse,u)
same => n,Hangup()
same => n(busy),Voicemail(401@CharleysHouse,b)
same => n,Hangup()
When I call the phone, at extension 401, and have CLI sip set debug on, I get the following snippet in the sip debug output:
INVITE sip:D40Line1@192.168.0.225:5060;ob SIP/2.0
Via: SIP/2.0/UDP 192.168.0.7:5060;branch=z9hG4bK216a3feb
Max-Forwards: 70
From: “zCharley” sip:zoipphone@192.168.0.7;tag=as4e231e2c
To: sip:D40Line1@192.168.0.225:5060;ob
Contact: sip:zoipphone@192.168.0.7:5060
Call-ID: 6e4dc15460aaed634b2ff7a6063a80d5@192.168.0.7:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.2.1
Date: Tue, 04 Mar 2014 23:26:19 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Alert-Info:
Content-Type: application/sdp
Content-Length: 255
v=0
o=root 602180888 602180888 IN IP4 192.168.0.7
s=Asterisk PBX 11.2.1
c=IN IP4 192.168.0.7
t=0 0
m=audio 17736 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
The Alert-Info header was properly inserted into the INVITE request (at least it looks proper to me…). I am not loading an external ringtone, but I am trying all this using built-in ringtones.
However, the phone still uses the default Digium ringtone. Why is the phone not picking this up?
I tried removing the angle brackets from around the ringtone name, and that had no effect (still used the default Digium ringtone).
RFC 3261, in Section 20.4, describes the Alert-Info header. It does not specify exactly what should be specified as the value of the header, but an example shows specifying a URL and a wav file name, enclosed in angle brackets, as the header value:
Alert-Info: http://www.example.com/sounds/moo.wav
As another test, I coded an instance of Alert-Info with http://192.168.0.7/sounds/moo.wav. I monitored all IP traffic with WireShark after calling the phone at extension 401. There were no IP packets observed coming from the phone after the INVITE packet that were related to the above URL. Since I don’t have a web server there, I would have expected TCP/IP errors of some kind when the nonexistant server did not respond. The phone rang the default Digium ringtone.
Am I missing something here?
— Charley