Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Extra REGISTER messages sent by Asterisk when subscribe for MWI is defined in zoiper


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
ohjelmistoarkkitehti a...
Guest





PostPosted: Tue Jul 15, 2014 3:16 am    Post subject: [asterisk-users] Extra REGISTER messages sent by Asterisk wh Reply with quote

Hello all,


I have an Asterisk installation with Kamailio using realtime integration. I have gotten my clients to register, but there is something odd about the sip message flow with some of my clients. My clients are Zoiper and Asterisk is 11.10.2. 


When I set 'Subscribe to MWI' value to 'both', after a normal, successful registration Asterisk begins to send REGISTER messages to Kamailio every 105 seconds. Kamailio responds with 200 OK. If I set the value to 'disabled', Asterisk does not send these frequent REGISTER messages. Probably due to these REGISTERs Kamailio sees 2 AORs for the account for those clients whose 'Subscribe to MWI' setting is defined as 'both'.


I know this is mostly not an Asterisk problem, but I'd like to understand better what exactly makes Asterisk to react this way? I didn't find any differences in the SIP messages during registration (I could be just blind though...), or in the way the clients are set up in the Realtime db. 


On the 'Subscribe to MWI' setting the Zoiper documentation states: "this tag specifies when Zoiper is going to subscribe for Message Waiting Indication(MWI) for this account". In addition to values 'both' and 'disabled' there are values 'before registration (Asterisk)' and 'after registration'. To me it seems strange to use REGISTER messages for subscribing to something related to voicemail messages. So far I haven't learned about the way Asterisk handles voicemail stuff but if You guys have some clarification on why I'm getting these results I'd appreciate it!


cheers,
Olli
Back to top
jcolp at digium.com
Guest





PostPosted: Tue Jul 15, 2014 7:40 am    Post subject: [asterisk-users] Extra REGISTER messages sent by Asterisk wh Reply with quote

Olli Heiskanen wrote:
Quote:

Hello all,

Bonjour,

Quote:
I have an Asterisk installation with Kamailio using realtime
integration. I have gotten my clients to register, but there is
something odd about the sip message flow with some of my clients. My
clients are Zoiper and Asterisk is 11.10.2.

When I set 'Subscribe to MWI' value to 'both', after a normal,
successful registration Asterisk begins to send REGISTER messages to
Kamailio every 105 seconds. Kamailio responds with 200 OK. If I set the
value to 'disabled', Asterisk does not send these frequent REGISTER
messages. Probably due to these REGISTERs Kamailio sees 2 AORs for the
account for those clients whose 'Subscribe to MWI' setting is defined as
'both'.

Can you provide a link to a sip debug log of this occurring? It sounds
extremely weird and I'm not really sure how chan_sip would be doing such
a thing...

Cheers,

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
ohjelmistoarkkitehti a...
Guest





PostPosted: Tue Jul 15, 2014 7:53 am    Post subject: [asterisk-users] Extra REGISTER messages sent by Asterisk wh Reply with quote

Hello,

Thanks for your response, I actually verified that the Zoiper setting is not the reason for Asterisk to start sending REGISTERs, it only looked like it as I checked the Kamailio output before Asterisk sent the first REGISTER to Kamailio, right after I had played with that setting. (sorry, my bad!)


However, _something_ is causing these REGISTERs, here's an example of a REGISTER message sent from Asterisk to Kamailio:


REGISTER sip:testers.com SIP/2.0
        Via: SIP/2.0/UDP my_ip:5070;branch=z9hG4bK7477f754;rport
        Max-Forwards: 70
        From: <sip:771@my_ip>;tag=as7a88c4c6
        To: <sip:771@my_ip>
        Call-ID: 3e946958322b1e2d6bfa564d46bf8e00@testers.com (3e946958322b1e2d6bfa564d46bf8e00@testers.com)
        CSeq: 121 REGISTER
        User-Agent: Asterisk PBX
        Expires: 120
        Contact: <sip:771@91.221.66.61:5070>
        Content-Length: 0



Is there any other reason - other than client settings - why this would happen?


cheers,
Olli





2014-07-15 15:40 GMT+03:00 Joshua Colp <jcolp@digium.com (jcolp@digium.com)>:
Quote:
Olli Heiskanen wrote:
Quote:

Hello all,

Bonjour,

Quote:
I have an Asterisk installation with Kamailio using realtime
integration. I have gotten my clients to register, but there is
something odd about the sip message flow with some of my clients. My
clients are Zoiper and Asterisk is 11.10.2.

When I set 'Subscribe to MWI' value to 'both', after a normal,
successful registration Asterisk begins to send REGISTER messages to
Kamailio every 105 seconds. Kamailio responds with 200 OK. If I set the
value to 'disabled', Asterisk does not send these frequent REGISTER
messages. Probably due to these REGISTERs Kamailio sees 2 AORs for the
account for those clients whose 'Subscribe to MWI' setting is defined as
'both'.


Can you provide a link to a sip debug log of this occurring? It sounds extremely weird and I'm not really sure how chan_sip would be doing such a thing...

Cheers,

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
jcolp at digium.com
Guest





PostPosted: Tue Jul 15, 2014 8:00 am    Post subject: [asterisk-users] Extra REGISTER messages sent by Asterisk wh Reply with quote

Olli Heiskanen wrote:
Quote:
Hello,

Thanks for your response, I actually verified that the Zoiper setting is
not the reason for Asterisk to start sending REGISTERs, it only looked
like it as I checked the Kamailio output before Asterisk sent the first
REGISTER to Kamailio, right after I had played with that setting.
(sorry, my bad!)

However, _something_ is causing these REGISTERs, here's an example of a
REGISTER message sent from Asterisk to Kamailio:

REGISTER sip:testers.com <http://testers.com> SIP/2.0
Via: SIP/2.0/UDP my_ip:5070;branch=z9hG4bK7477f754;rport
Max-Forwards: 70
From: <sip:771@my_ip>;tag=as7a88c4c6
To: <sip:771@my_ip>
Call-ID: 3e946958322b1e2d6bfa564d46bf8e00@testers.com
<mailto:3e946958322b1e2d6bfa564d46bf8e00@testers.com>
CSeq: 121 REGISTER
User-Agent: Asterisk PBX
Expires: 120
Contact: <sip:771@91.221.66.61:5070
<http://sip:771@91.221.66.61:5070>>
Content-Length: 0

Is there any other reason - other than client settings - why this would
happen?

If Asterisk was configured to do so, yes. Do you have any register lines
in sip.conf or do you have the "callbackextension" option set for any peers?

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
ohjelmistoarkkitehti a...
Guest





PostPosted: Tue Jul 15, 2014 8:23 am    Post subject: [asterisk-users] Extra REGISTER messages sent by Asterisk wh Reply with quote

Thanks, there are no register lines in my sip.conf, but I have defined callbackextension fields in the realtime table, to be the same value as the extension name. In this case, extension 771 has callbackextension value 771. I tried replacing those with null values but that had no effect on the outcome.



Currently when I register clients in, after some seconds Asterisk starts sending REGISTER messages, at which point Kamailio sees 2 AORs, here's an example: 
(here 1.1.1.1 is the public ip of my server that houses Kamailio at 5060 and Asterisk at 5070, and 2.2.2.2 is the public ip of the network clients are in)


        AOR:: 771@testers.com (771@testers.com)
                Contact:: sip:771@2.2.2.2:5060;rinstance=c8447637c890c010;transport=UDP Q=
                        Expires:: 3470
                        Callid:: NDQ5Njk4ZmUxZGJhNzRjMzUwMTA2OThmOGFjYzc4Zjk.
                        Cseq:: 2
                        User-agent:: Z 3.2.21357 r21367
                        State:: CS_SYNC
                        Flags:: 0
                        Cflag:: 0
                        Socket:: udp:1.1.1.1:5060
                        Methods:: 5087
                        Ruid:: uloc-53bfe447-35b0-608
                        Reg-Id:: 0
                        Last-Keepalive:: 1405429865
                        Last-Modified:: 1405429865
        AOR:: 771@1.1.1.1 (771@1.1.1.1)
                Contact:: sip:771@1.1.1.1:5070 Q=
                        Expires:: 105
                        Callid:: 3e946958322b1e2d6bfa564d46bf8e00@testers.com (3e946958322b1e2d6bfa564d46bf8e00@testers.com)
                        Cseq:: 133
                        User-agent:: Asterisk PBX
                        State:: CS_SYNC
                        Flags:: 0
                        Cflag:: 0
                        Socket:: udp:1.1.1.1:5060
                        Methods:: 4294967295
                        Ruid:: uloc-53bfe447-35b0-708
                        Reg-Id:: 0
                        Last-Keepalive:: 1405429980
                        Last-Modified:: 1405429980



I guess there should be only one AOR, so Asterisk might get wrong kind of data to begin with or it's configured incorrectly. In my sip trace the REGISTER flow from client to Kamailio to Asterisk seems ok, I could be wrong though. 


In my setup clients authenticate with Kamailio and Kamailio sends a REGISTER to Asterisk according to guide I used: http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb


How would I fix this double-AOR problem, can it be fixed on Asterisk configuration? 


thanks,
Olli













2014-07-15 16:00 GMT+03:00 Joshua Colp <jcolp@digium.com (jcolp@digium.com)>:
Quote:
Olli Heiskanen wrote:
Quote:
Hello,

Thanks for your response, I actually verified that the Zoiper setting is
not the reason for Asterisk to start sending REGISTERs, it only looked
like it as I checked the Kamailio output before Asterisk sent the first
REGISTER to Kamailio, right after I had played with that setting.
(sorry, my bad!)

However, _something_ is causing these REGISTERs, here's an example of a
REGISTER message sent from Asterisk to Kamailio:


REGISTER sip:testers.com <http://testers.com> SIP/2.0
         Via: SIP/2.0/UDP my_ip:5070;branch=z9hG4bK7477f754;rport
         Max-Forwards: 70
         From: <sip:771@my_ip>;tag=as7a88c4c6
         To: <sip:771@my_ip>
         Call-ID: 3e946958322b1e2d6bfa564d46bf8e00@testers.com (3e946958322b1e2d6bfa564d46bf8e00@testers.com)

<mailto:3e946958322b1e2d6bfa564d46bf8e00@testers.com (3e946958322b1e2d6bfa564d46bf8e00@testers.com)>
         CSeq: 121 REGISTER
         User-Agent: Asterisk PBX
         Expires: 120
         Contact: <sip:771@91.221.66.61:5070

<http://sip:771@91.221.66.61:5070>>
         Content-Length: 0

Is there any other reason - other than client settings - why this would
happen?


If Asterisk was configured to do so, yes. Do you have any register lines in sip.conf or do you have the "callbackextension" option set for any peers?

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Back to top
jcolp at digium.com
Guest





PostPosted: Tue Jul 15, 2014 8:26 am    Post subject: [asterisk-users] Extra REGISTER messages sent by Asterisk wh Reply with quote

Olli Heiskanen wrote:
Quote:

Thanks, there are no register lines in my sip.conf, but I have defined
callbackextension fields in the realtime table, to be the same value as
the extension name. In this case, extension 771 has callbackextension
value 771. I tried replacing those with null values but that had no
effect on the outcome.

The callbackextension is the reason this is happening.

From sip.conf.sample:

; A similar effect can be achieved by adding a "callbackextension"
option in a peer section.
; this is equivalent to having the following line in the general section:
;
; register => username:secret@host/callbackextension
;
; and more readable because you don't have to write the parameters in
two places
; (note that the "port" is ignored - this is a bug that should be fixed).

Remove that column from your table, restart Asterisk, and it should go away.

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
ohjelmistoarkkitehti a...
Guest





PostPosted: Tue Jul 15, 2014 8:56 am    Post subject: [asterisk-users] Extra REGISTER messages sent by Asterisk wh Reply with quote

Wow, thanks Joshua, it would've taken me forever to find the answer there. It did the trick and the registrations look much better.


Merci beaucoup!



- Olli





2014-07-15 16:26 GMT+03:00 Joshua Colp <jcolp@digium.com (jcolp@digium.com)>:
Quote:
Olli Heiskanen wrote:
Quote:

Thanks, there are no register lines in my sip.conf, but I have defined
callbackextension fields in the realtime table, to be the same value as
the extension name. In this case, extension 771 has callbackextension
value 771. I tried replacing those with null values but that had no
effect on the outcome.


The callbackextension is the reason this is happening.

From sip.conf.sample:

; A similar effect can be achieved by adding a "callbackextension" option in a peer section.
; this is equivalent to having the following line in the general section:
;
;        register => username:secret@host/callbackextension
;
; and more readable because you don't have to write the parameters in two places
; (note that the "port" is ignored - this is a bug that should be fixed).

Remove that column from your table, restart Asterisk, and it should go away.

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Back to top
ohjelmistoarkkitehti a...
Guest





PostPosted: Fri Jul 18, 2014 4:18 am    Post subject: [asterisk-users] Extra REGISTER messages sent by Asterisk wh Reply with quote

Hello,

I noticed something that might be a result from the fix suggested here, so I'll continue a bit on this thread. After removing the callbackextension field from my realtime sip peer table, the following started happening:  I issued command 'sip reload' on the cli and get the following warning: 


WARNING[24427]: res_config_mysql.c:501 realtime_multi_mysql: MySQL RealTime: Failed to query database: Unknown column 'callbackextension' in 'where clause'



This must be a result from removing that field from the db, but somewhere in the code there is a select statement where the callbackextension field is used in the where clause, resulting to the above warning.


I wonder if this something to be worried about, or is going to cause problems later? My goal is of coure just to handle calls, save cdrs, do pbx features etc with this asterisk. 


cheers,
Olli





2014-07-15 16:56 GMT+03:00 Olli Heiskanen <ohjelmistoarkkitehti@gmail.com (ohjelmistoarkkitehti@gmail.com)>:
Quote:

Wow, thanks Joshua, it would've taken me forever to find the answer there. It did the trick and the registrations look much better.


Merci beaucoup!



- Olli





2014-07-15 16:26 GMT+03:00 Joshua Colp <jcolp@digium.com (jcolp@digium.com)>:
Quote:
Olli Heiskanen wrote:
Quote:

Thanks, there are no register lines in my sip.conf, but I have defined
callbackextension fields in the realtime table, to be the same value as
the extension name. In this case, extension 771 has callbackextension
value 771. I tried replacing those with null values but that had no
effect on the outcome.


The callbackextension is the reason this is happening.

From sip.conf.sample:

; A similar effect can be achieved by adding a "callbackextension" option in a peer section.
; this is equivalent to having the following line in the general section:
;
;        register => username:secret@host/callbackextension
;
; and more readable because you don't have to write the parameters in two places
; (note that the "port" is ignored - this is a bug that should be fixed).

Remove that column from your table, restart Asterisk, and it should go away.

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users







Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services