[asterisk-users] x-ast-orig-host - How is this IP taken ?

2020-06-10 Thread Administrator

Hi list,

We have a strange behavior: a customer Snom300 behind a public FW has 
contact like


contact  : 
sip:user@x.y.39.147:2048;x-ast-orig-host=169.254.252.1:2048


The phone can place calls but not receive any. Also, qualify give 
unreachable which seems correct when looking the x-ast-orig-host IP. 
Problem is that the local IP of this phone is 192.168.1.75


Question: how asterisk sets this IP ? It looks for us like a FW issue as 
we have other customers with approaching local network organisation and 
which are not facing this problem.


Thanks for any hint.

--
Daniel

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] call replicating

2020-06-10 Thread Marek Greško
Hello,

provider responded the behavior is intentional from their side. So
this should be fixed in asterisk. The pjsip cleanly does not do any
unregistrations where it should.

Marek


2020-06-07 12:30 GMT+02:00, Marek Greško :
> Hello,
>
> I found the problem and also the workaround.
>
> Clearly, since it was working with chan_sip it should not be dialplan
> problem, but sip stack problem.
>
> I have line=yes set up. After asterisk restart the old registration is
> not unregistered and new one is registered with different line value.
> Then incoming invites and qualify requests are sent to all the
> registrations and there the problem lies.
>
> I am thinking of how could asterisk prevent such situations.
>
> 1. I think it should send unregistration requests on shutdown.
>
> 2. I think it should keep the database of active registrations and
> unregister and reregister all of them during startup in case some of
> them remain active after unclean shutdown.
>
> Also probably provider side should be fixed?
>
> Thanks for your insight.
>
> Marek
>
>
> 2020-06-05 19:29 GMT+02:00, Doug Lytle :
>> On 6/5/20 12:24 PM, Marek Greško wrote:
>>> How can this behavior been overriden? I do not expect this is problem
>>> on provider side, since it was working normally using chan_sip.
>>
>> Console output and dial plan snippets are always useful when diagnosing,
>>
>> Doug
>>
>>
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] CDR mysql: timeout when remote database unavailable

2020-06-10 Thread Antony Stone
On Wednesday 10 June 2020 at 16:33:53, Doug Lytle wrote:

> >>> Instead, the call still terminates if mysql cannot be reached.
> 
> I just tested this, I'm using cdr_odbc, by shutting down mysql and I did
> not experience the call being dropped.

That sounds different to me.

The OP is asking about a call which starts at a time when MySQL is not 
available.

It sounds as though you made a call, then terminated MySQL, and the call did 
not terminate.

> The console logged the mysql failure, but the call continued.
> 
> You may want to consider moving to cdr_odbc instead.

I certainly agree with that suggestion / recommendation.


Antony.

-- 
"Black holes are where God divided by zero."

 - Steven Wright

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] CDR mysql: timeout when remote database unavailable

2020-06-10 Thread Doug Lytle
>>> Instead, the call still terminates if mysql cannot be reached.

I just tested this, I'm using cdr_odbc, by shutting down mysql and I did not 
experience the call being dropped.

The console logged the mysql failure, but the call continued.

You may want to consider moving to cdr_odbc instead.

Doug

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] CDR mysql: timeout when remote database unavailable

2020-06-10 Thread Fourhundred Thecat
> On 2020-06-08 16:37, Sean Bright wrote:
>
> In the case of cdr_mysql, the connect timeout is configurable by putting
> the following in cdr_mysql.conf:
>
> [global]
> timeout = 5 ; Set connect timeout to 5 seconds

OK, so i changed the timeout to 2 sec, but it does not have the desired
effect. I expected, if mysql cannot be reached, after 2 seconds the call
will progress normally.

Instead, the call still terminates if mysql cannot be reached.

Is it possible to set in asterisk, if mysql is unreachable then skip the
step and simply ignore mysql logging ?


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] asterisk hints can be in multiple states; most sip NOTIFY dialogs only send one state

2020-06-10 Thread John Hughes

On 10/06/2020 15:40, Joshua C. Colp wrote:


You wouldn't be able to access such information from 
ast_sip_presence_exten_state_to_str, that function is strictly for 
taking in instructions/data and producing the output. The user of it 
would need to pass in a value to turn on this new behavior. From that 
level the ast_sip_exten_state_data structure can optionally have a 
subscription, which itself has the endpoint that was used to establish 
the subscription.


Ok, I'll look at that when I get around to moving to chan_pjsip. I'm 
very slow at changing working configurations.  :)




--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] Support or 12 Bogen HS201C analog phones

2020-06-10 Thread Jerry Geis
Any suggestions for an analog to SIP gateway that would support these
devices. I need 12 phones supported. I cannot use any analog cards in this
case - different buildings.
Thanks,

Jerry
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] asterisk hints can be in multiple states; most sip NOTIFY dialogs only send one state

2020-06-10 Thread Joshua C. Colp
On Wed, Jun 10, 2020 at 10:27 AM John Hughes  wrote:

> Asterisk can know that one of the attached phones is both "ringing" and
> "on the phone".
>
> However the sip NOTIFY it sends out to interested parties can only
> communicate one state, for example with pidf+xml it can either send
> "Ringing" or "On the phone" and so it sends "Ringing".
>
> This makes the "busy lights" less than useful, if a call makes multiple
> phones ring you can't tell, looking at the busy lights, which ones are
> busy, and so less likely to answer.
>
> In the chan_sip configuration there is an option "notifyringing":
>
> notifyringing
>
> *notifyringing* enables or disables notifications for the RINGING state
> when an extension is already INUSE. Only affects subscriptions using the
> *dialog-info* event package. Option can be configured in the general
> section only. It cannot be set per-peer.
>
> As the doc says this only applies to dialog-info style NOTIFY, not the
> pidf+xml format my phones use.
>
> Here is a patch that makes notifyringing work for pidf+xml.
>
> Generalising it for other formats is left as an exercise for the reader.
>
> Of course chan_sip is obsolete.  How might this be done for chan_pjsip?
> Parts of the code are similar, but the layering is vastly different.  How
> could the ast_sip_presence_exten_state_to_str function in
> res/res_pjsip/presence_xml.c get at the pjsip configuration?
>

You wouldn't be able to access such information from
ast_sip_presence_exten_state_to_str, that function is strictly for taking
in instructions/data and producing the output. The user of it would need to
pass in a value to turn on this new behavior. From that level the
ast_sip_exten_state_data structure can optionally have a subscription,
which itself has the endpoint that was used to establish the subscription.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] asterisk hints can be in multiple states; most sip NOTIFY dialogs only send one state

2020-06-10 Thread John Hughes
Asterisk can know that one of the attached phones is both "ringing" and 
"on the phone".


However the sip NOTIFY it sends out to interested parties can only 
communicate one state, for example with pidf+xml it can either send 
"Ringing" or "On the phone" and so it sends "Ringing".


This makes the "busy lights" less than useful, if a call makes multiple 
phones ring you can't tell, looking at the busy lights, which ones are 
busy, and so less likely to answer.


In the chan_sip configuration there is an option "notifyringing":


   notifyringing

   *notifyringing* enables or disables notifications for the RINGING
   state when an extension is already INUSE. Only affects subscriptions
   using the *dialog-info* event package. Option can be configured in
   the general section only. It cannot be set per-peer.

As the doc says this only applies to dialog-info style NOTIFY, not the 
pidf+xml format my phones use.


Here is a patch that makes notifyringing work for pidf+xml.

Generalising it for other formats is left as an exercise for the reader.

Of course chan_sip is obsolete.  How might this be done for chan_pjsip?  
Parts of the code are similar, but the layering is vastly different.  
How could the ast_sip_presence_exten_state_to_str function in 
res/res_pjsip/presence_xml.c get at the pjsip configuration?


Description: make "notifyringing" work with pidf+xml
 If sip config specifies notifyringing=no and an extension is in a call
 then we send out "On a call" instead of "Ringing" so people can see
 who is not going to pick the call up.
Author: John Hughes 
Last-Update: 2020-06-09

--- asterisk-13.14.1~dfsg.orig/channels/chan_sip.c
+++ asterisk-13.14.1~dfsg/channels/chan_sip.c
@@ -14966,7 +14966,10 @@ static void state_notify_build_xml(struc
 		statestring = (sip_cfg.notifyringing) ? "early" : "confirmed";
 		local_state = NOTIFY_INUSE;
 		pidfstate = "busy";
-		pidfnote = "Ringing";
+		if (subscribed == PIDF_XML && !sip_cfg.notifyringing) 
+			pidfnote = "On the phone";
+		else
+			pidfnote = "Ringing";
 		break;
 	case AST_EXTENSION_RINGING:
 		statestring = "early";
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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