cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Welcome to the Cisco Small Business Community

Have a question? Click on a topic board below to get started in the community.
Get the latest news in this issue of the Cisco Small Business Monthly Newsletter

9266
Views
0
Helpful
13
Replies
Highlighted
Beginner

Custom SIP header in INVITE msg: OK w/941, NOK w/962

I'm facing an issue with custom INVITE messages (sent from an Asterisk box) in order to choose the ringtone.

The SPA941 phones (latest FW - and it was already working fine with old 4.1.8) play the correct ringtone specified in the custom header, while the SPA962 (+SPA932) doesn't (FW 6.1.5a) and keeps playing the default ringtone.


These are the strings (ext 200 is the 962 and 201 is the 941) :


exten => s,50,SIPAddHeader(Alert-Info: n=Office)
exten => s,51,Dial(SIP/200&SIP/201,60,t)


Thanks in advance,

Paolo

Message was edited by: Paolo Grazioli (typos)

Everyone's tags (5)
13 REPLIES 13
Highlighted
Cisco Employee

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Hi Paolo,

I'll research this and get back to you.

Regards,

Patrick

----------

Highlighted
Cisco Employee

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Hi Paolo,

I've not forgotten this, apologies for the delay.

Can you please verify the following please? SPA962 web-ui > Phone > Ring Tone > Ring10: n=Office;w=4;c=1

This setting and name should be identical to the working SPA941.

I'm building an Asterisk server in order to verify this for myself.

Regards,

Patrick

----------

Highlighted
Cisco Employee

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Hi Paolo,

I've built an Asterisk server and configured a SPA962 running 6.1.5(a) firmware.

I configured 2 phones,SPA962 as ext200 and SPA942 as ext201 with:

exten => 200,1,Dial(SIP/200)

exten => 201,1,Dial(SIP/201)

This causes both phones to ring with the default Classic-1 ringtone.

I then modified ext200 as follows:

changed from:

exten => 200,1,Dial(SIP/200)

changed to:

exten => 200,1,SIPAddHeader(Alert-Info: n=Office)
exten => 200,2,Dial(SIP/200)

Now when I dial 200, it plays the Office ringtone.

I couldn't get the syntax that you supplied to work, probably due to me being an Asterisk rookie. However; I was able to prove that the SPA962 does support playing a custom ringtone within an Asterisk environment.

Here's a trace of an INVITE without the header:

Session Initiation Protocol
    Request-Line: INVITE sip:200@192.168.2.14:5060 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 192.168.2.19:5060;branch=z9hG4bK2fa6e5a8;rport
        From: "Asterisk942" <201>;tag=as5cd65a9c
        To: <200>
        Contact: <201>
        Call-ID: 6ff6e04d6cffd79a3c3999bb48f958ea@192.168.2.19
        CSeq: 102 INVITE
        User-Agent: Asterisk PBX
        Max-Forwards: 70
        Date: Wed, 25 Mar 2009 19:58:41 GMT
        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
        Supported: replaces
        Content-Type: application/sdp
        Content-Length: 287
    Message Body

Here's a trace of an INVITE with the modified header:

Session Initiation Protocol
    Request-Line: INVITE sip:200@192.168.2.14:5060 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 192.168.2.19:5060;branch=z9hG4bK0458f79b;rport
        From: "Asterisk942" <201>;tag=as7d46d1ce
        To: <200>
        Contact: <201>
        Call-ID: 23f6582d3df9e52167d8ed223011e71d@192.168.2.19
        CSeq: 102 INVITE
        User-Agent: Asterisk PBX
        Max-Forwards: 70
        Date: Wed, 25 Mar 2009 19:55:17 GMT
        Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
        Supported: replaces
        Alert-Info: n=Office
        Content-Type: application/sdp
        Content-Length: 287
    Message Body

Please let me know of any progress.

Regards,

Patrick

----------

Highlighted
Beginner

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Hi Patrick,

sorry for the awful delay of my reply.

It works perfectly!

So yes indeed it's possible to choose the ringtone on all the SPA phones.

The 's' in the original exten statement should be something related to macros, as far as I understand (I'm a complete Asterisk newbie).

I'll go on studying Asterisk tutorials... It wasn't very clear to me how the syntax works and I guess the statements were a bit messed up.

Regards,

Paolo

Highlighted
Cisco Employee

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Paolo,

No problem about the delay. I understand what it's like to have lots going on. :-)

Thanks for letting know that the issue is resolved for you.

Regards,

Patrick

----------

Highlighted
Beginner

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Hi Guys,

I've tried the exact same line:

exten => 225,1,SIPAddHeader(Alert-Info: n=Office)

with my SPA-942 (Software version 5.1.15(a)) and Asterisk 1.4 this does not seem to change the ringtone. When I debug the SIP traffic, I do see the SIP header being sent to the phone.

Is this software dependant?

Thx!!!

Highlighted
Cisco Employee

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Hi bartconinckx,

It could well be software dependant. Consider upgrading the phone and trying again.

The header says SPA962 but the body mentions SPA942. In my lab, I used a SPA942 running 6.1.3(a) when I worked this issue for Paolo.

Regards,

Patrick

-----------

Highlighted
Beginner

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Patrick,

thx for your usefull answer. This probably will be the reason. It's a pity there are no "bulk" upgrading tools, 'cause now I have to do 70 phones manually. Or perhaps I should check the docs if the firmware is upgradable via TFTP.

I'll try this ASAP!

Thank you!

Bart

Highlighted
Cisco Employee

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Hi Bart,

There are several ways to upgrade these types of devices:

     1. Run the firmware utility [Windows only] and upgrade each phone

OR

     2. Upgrade by URL by causing the phone to request an upgrade:

            http://IP_Address_of_SPA-Phone/upgrade?tftp://IP_Address_of_TFTP_Server/PhoneFirmwareBinaryFile.bin

               Described in more detail in https://www.myciscocommunity.com/docs/DOC-5938

OR

     3. Write a config file containing the upgrade instruction and then:

          a. Use phone Setup button > Profile Rule > http://IP_Address_of_Server/PhoneConfigFile

     OR

         b. Send the phone a resync:

          http://IP_Address_of_SPA-Phone/admin/resync?tftp://IP_Address_of_TFTP_Server/PhoneConfigFile

Regards,

Patrick

--------

Highlighted
Beginner

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Hi Patrick,

most usefull info!

Before your post I already had upgraded one phone with the 6.1.3a firmware and now it indeed works. Me happy :-)

I will do a batch upgrade for some phones, test them for a couple of days and then do the lot.

Thanks again,

Bart

Highlighted
Cisco Employee

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Hi Bart,

Great, thanks for letting me know. Please consider sharing any insights that you gain so that others in the community can benefit from your experiences using the SPA IP phones in an Asterisk environment.

Regards,

Patrick

----------

Highlighted
Beginner

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

OK, Patrick, I will.

So, inconclusion, doing the firmware upgrade did allow me to send the SIP header and change te ringtone.

I upgraded by using TFTP on my Asterisk server and filling out the "Upgrade Rule" on the provisioning tab of the SPA942. Worked smoothly.

Highlighted
Cisco Employee

Re: Custom SIP header in INVITE msg: OK w/941, NOK w/962

Thanks for the update Bart. I'm glad that it's working for you.

Regards,

Patrick

----------