Re: [asterisk-users] clarification on gosub, macros and AEL

2019-10-15 Thread Brian J. Murrell
On Fri, 2019-10-11 at 14:12 -0400, Brian J. Murrell wrote:
> I'm trying to clarify my understand of gosub, macros and AEL.
> 
> My understanding is that macros using the Macro() application, which
> is
> defined in extensions.conf by:
> 
> [macro-foo]
> ...
> 
> and called in extensions.conf with
> 
> exten => _9NXXNXX.,n,Macro(fastbusy)
> 
> is deprecated in favour of Gosub().  True so far?
> 
> But then there are "macro"s defined in extensions.ael:
> 
> macro foo() { ... }
> 
> and called in extensions.ael with:
> 
> (...)
> 
> These are not deprecated because they use Gosub() underneath and not
> Macro()?  Still good so far?
> 
> So if macros in extensions.ael are not deprecated because they just
> use
> Gosub() underneath them, when why, when I try to use Gosub() and
> contexts in extensions.ael directly do I get warnings like:
> 
> [Oct 11 13:50:55] WARNING[10343]: ael/pval.c:2526 check_pval_item:
> Warning: file /etc/asterisk/extensions.ael, line 552-552: application
> call to Gosub affects flow of control, and needs to be re-written
> using AEL if, while, goto, etc. keywords instead!
> 
> but not with these Gosub() implemented "macros"?

Nobody has any information or opinions on any of this?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] clarification on gosub, macros and AEL

2019-10-11 Thread Brian J. Murrell
I'm trying to clarify my understand of gosub, macros and AEL.

My understanding is that macros using the Macro() application, which is
defined in extensions.conf by:

[macro-foo]
...

and called in extensions.conf with

exten => _9NXXNXX.,n,Macro(fastbusy)

is deprecated in favour of Gosub().  True so far?

But then there are "macro"s defined in extensions.ael:

macro foo() { ... }

and called in extensions.ael with:

(...)

These are not deprecated because they use Gosub() underneath and not
Macro()?  Still good so far?

So if macros in extensions.ael are not deprecated because they just use
Gosub() underneath them, when why, when I try to use Gosub() and
contexts in extensions.ael directly do I get warnings like:

[Oct 11 13:50:55] WARNING[10343]: ael/pval.c:2526 check_pval_item: Warning: 
file /etc/asterisk/extensions.ael, line 552-552: application call to Gosub 
affects flow of control, and needs to be re-written using AEL if, while, goto, 
etc. keywords instead!

but not with these Gosub() implemented "macros"?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] IPv4 address in SDP o= is (null) when configured for NAT using pjsip

2019-09-21 Thread Brian J. Murrell
Using Asteirsk 13.28.1:

If I configure my pjsip transport to handle NAT from the Internet:

[transport-tcp]
type=transport
protocol=tcp
bind=10.75.22.8:5060
local_net=10.75.22.0/24
external_media_address=[external address redacted]
external_signaling_address=[external address redacted]

When a call comes from a TCP registered SIP client on the Internet,
Asterisk is setting the IPv4 address in the "o=" and "c=" lines of the
SDP ICE payload to "(null)":

v=0
o=- 3654 548 IN IP4 (null)
s=Asterisk
c=IN IP4 (null)

IPv4 addresses in all of the a= lines are still correct.

This "(null)" of course causes the caller to fail to complete the call.

Is there something more I have to do to have Asterisk/pjsip properly
set the IPv4 address in the SDP ICE payloads?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] if statement with true value that contains a colon

2019-09-13 Thread Brian J. Murrell
On Fri, 2019-09-13 at 14:21 +0200, Administrator TOOTAI wrote:
> 
> Escape it with \

Tried that.  It doesn't work.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] if statement with true value that contains a colon

2019-09-13 Thread Brian J. Murrell
How can I use an IF statement with a true value being a variable that
has a colon in it?  The colon in the true value variable is being taken
as the delimiter for the false value.

The only solution I came up with was some hackery to use STRREPLACE to
replace the : with a % before the IF statement and then use STRREPLACE
again after to change the % back to a :.

i.e.:

Set(dialexts=${STRREPLACE(dialexts,:,%)});
Set(dialexts=${IFTIME(8:00-22:00?${dialexts}&${MBDR}:${dialexts})});
Set(dialexts=${STRREPLACE(dialexts,%,:)});


Is there no better alternative?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] Preventing rewrite of To: address in MESSAGE transactions

2019-08-23 Thread Brian J. Murrell
On Tue, 2019-07-16 at 16:20 -0400, Brian J. Murrell wrote:
> Is there any option to prevent Asterisk from rewriting the To:
> address
> of a SIP MESSAGE that it's received and will forward to another SIP
> client?
> 
> That is, when Asterisk receives a MESSAGE with the To; header saying:
> 
> To: 
> 
> and wants to forward that to foo@10.75.22.100, I'd like the To:
> header
> to remain:
> 
> To: 
> 
> when it sends it.
> 
> Any possibility to do this?

Should I take the lack of response as meaning no?

No comment on any of this thread at all?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] Preventing rewrite of To: address in MESSAGE transactions

2019-07-16 Thread Brian J. Murrell
Is there any option to prevent Asterisk from rewriting the To: address
of a SIP MESSAGE that it's received and will forward to another SIP
client?

That is, when Asterisk receives a MESSAGE with the To; header saying:

To: 

and wants to forward that to foo@10.75.22.100, I'd like the To: header
to remain:

To: 

when it sends it.

Any possibility to do this?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] RHS of the To: address in MESSAGE transactions

2019-06-11 Thread Brian J. Murrell
On Thu, 2019-06-06 at 09:33 -0400, Brian J. Murrell wrote:
> I'm trying to use linphone-android with asterisk but there is an
> aspect
> of the way asterisk and linphone-android interact with MESSAGE
> transactions that is causing problems.
> 
> The linphone-android folks consider both the To: and From: address in
> MESSAGE transactions when deciding which "chat" to put a received
> MESSAGE into.  Every combination of To: and From: address are a
> separate "chat" in their messaging paradigm.
> 
> So when asterisk sends a MESSAGE transaction such as:
> 
> MESSAGE
> sip:my_sip_account@[2001:123:ab:123:51e2:cc83:ae66:8c70]:38915;transp
> ort=udp;app-id=755770037818;pn-type=firebase;pn-timeout=0;pn-
> tok==[redacted];pn-silent=1 SIP/2.0
> Via: SIP/2.0/UDP
> [2001:123:ab:123::2]:5060;rport;branch=z9hG4bKPj138c026c-4437-4b59-
> 982f-f991521d3cdc
> From: "5565551212" ;tag=5b5fe395-
> ff22-44fa-aa6b-7f770f8e0026
> To:  id=755770037818;pn-type=firebase;pn-timeout=0;pn-tok==[redacted];pn-
> silent=1>
> Contact: 
> Call-ID: 5e4fc686-72ce-4c20-bd2f-7f82e232a9db
> CSeq: 29808 MESSAGE
> Max-Forwards: 70
> User-Agent: Asterisk PBX 13.26.0
> Content-Type: text/plain
> Content-Length: 4
> 
> hey!
> 
> it files it into the chat for the combination of:
> 
> From: "5565551212" ;tag=5b5fe395-
> ff22-44fa-aa6b-7f770f8e0026
> To:  id=755770037818;pn-type=firebase;pn-timeout=0;pn-tok==[redacted];pn-
> silent=1>
> 
> and because the To: includes the IP address of the client, every time
> the client moves networks (or even regenerates a new "Privacy
> Extensions" IPv6 address) a new chat is created for the same sender.
> 
> Their position is that the RHS of the To: should be the name of the
> Asterisk machine such as:
> 
> To:  type=firebase;pn-timeout=0;pn-tok==[redacted];pn-silent=1>
> 
> While that seems odd to me, from a common-sense perspective, I don't
> have a deep enough background in the SIP protocol to decide if it's
> wrong or not, and if it's not, how to make Asterisk do it, as in
> something similar to the pjsip from_domain endpoint parameter that
> can
> be used to set the domain of the From: header for MESSAGEs to that
> endpoint.
> 
> Any opinions, ideas or otherwise?

Nobody has any options either way on this one?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] RHS of the To: address in MESSAGE transactions

2019-06-06 Thread Brian J. Murrell
I'm trying to use linphone-android with asterisk but there is an aspect
of the way asterisk and linphone-android interact with MESSAGE
transactions that is causing problems.

The linphone-android folks consider both the To: and From: address in
MESSAGE transactions when deciding which "chat" to put a received
MESSAGE into.  Every combination of To: and From: address are a
separate "chat" in their messaging paradigm.

So when asterisk sends a MESSAGE transaction such as:

MESSAGE 
sip:my_sip_account@[2001:123:ab:123:51e2:cc83:ae66:8c70]:38915;transport=udp;app-id=755770037818;pn-type=firebase;pn-timeout=0;pn-tok==[redacted];pn-silent=1
 SIP/2.0
Via: SIP/2.0/UDP 
[2001:123:ab:123::2]:5060;rport;branch=z9hG4bKPj138c026c-4437-4b59-982f-f991521d3cdc
From: "5565551212" 
;tag=5b5fe395-ff22-44fa-aa6b-7f770f8e0026
To: 

Contact: 
Call-ID: 5e4fc686-72ce-4c20-bd2f-7f82e232a9db
CSeq: 29808 MESSAGE
Max-Forwards: 70
User-Agent: Asterisk PBX 13.26.0
Content-Type: text/plain
Content-Length: 4

hey!

it files it into the chat for the combination of:

From: "5565551212" 
;tag=5b5fe395-ff22-44fa-aa6b-7f770f8e0026
To: 


and because the To: includes the IP address of the client, every time
the client moves networks (or even regenerates a new "Privacy
Extensions" IPv6 address) a new chat is created for the same sender.

Their position is that the RHS of the To: should be the name of the
Asterisk machine such as:

To: 


While that seems odd to me, from a common-sense perspective, I don't
have a deep enough background in the SIP protocol to decide if it's
wrong or not, and if it's not, how to make Asterisk do it, as in
something similar to the pjsip from_domain endpoint parameter that can
be used to set the domain of the From: header for MESSAGEs to that
endpoint.

Any opinions, ideas or otherwise?  Is the position of what should be in
the RHS of the To: address even valid or MUST it always be the address
of the next hop on path to delivering the MESSAGE?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] IPv6 transport results in ICE with only IPv6 candidates

2019-04-17 Thread Brian J. Murrell
On Wed, 2019-04-17 at 13:50 -0400, Joshua C. Colp wrote:
> 
> The same escaping should apply there for extensions.conf as it's a
> config file thing, I don't use AEL and don't know anything in that
> regard. It may work the same way there.

How very odd.  It is working now.  I am sure I did nothing different
than the first time.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] IPv6 transport results in ICE with only IPv6 candidates

2019-04-17 Thread Brian J. Murrell
On Wed, 2019-04-17 at 11:56 -0400, Joshua C. Colp wrote:
> On Wed, Apr 17, 2019, at 12:51 PM, Brian J. Murrell wrote:
> > 
> > I can add it onto the end of the variable in the Dial() command:
> > 
> > Dial(${FRED};transport=tcp,${timeout},TtWw);

[ the part you trimmed ]:

and it has the desired effect, but of course specifying at the point
where the Dial command is sets the transport policy much too broadly.

> You escape the ; character by placing \ in front of it. IE:
> 
> DIal(${FRIED}\;transport=tcp,${timeout},TtWw);

So per the above ("has the desired effect") one doesn't even have to
escape the ; in the Dial() command.

But I don't want the ";transport=tcp" hard-coded into the Dial()
command argument where the Dial() command is executed.  That is making
a transport policy (i.e. not every destination that gets to that Dial()
command should use tcp) decision for far too many destinations.

The ";transport=tcp" needs to be added where the destination is defined
into a variable:

FRED=PJSIP/outgoing/sip:f...@sip.example.com;transport=tcp

in extensions.conf or:

FRED="PJSIP/outgoing/sip:f...@sip.example.com;transport=tcp";

in extensions.ael.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] IPv6 transport results in ICE with only IPv6 candidates

2019-04-17 Thread Brian J. Murrell
On Wed, 2019-04-17 at 10:04 -0400, Joshua C. Colp wrote:
> 
> You specify the transport in the SIP URI. For example:
> 
> sip:t...@example.com;transport=tcp

Hrm.  This is probably going to be pretty basic, but some googling
didn't seem to come up with anything.  How do you do this when you are
assigning to a variable in extensions.conf such as:

FRED=PJSIP/outgoing/sip:f...@sip.example.com;transport=tcp

The ; is taken as a comment starting character, isn't it?

Even in AEL:

FRED="PJSIP/outgoing/sip:f...@sip.example.com;transport=tcp";

The ;transport=tcp doesn't seem to survive.

I can add it onto the end of the variable in the Dial() command:

Dial(${FRED};transport=tcp,${timeout},TtWw);

and it has the desired effect, but of course specifying at the point
where the Dial command is sets the transport policy much too broadly.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] IPv6 transport results in ICE with only IPv6 candidates

2019-04-17 Thread Brian J. Murrell
Hi,

I'm using Asterisk 13.x and have defined a pjsip TCP IPv6 transport:

[transport-tcp-ipv6]
type=transport
protocol=tcp
bind=[2001:1234:5678:abcd::2]:5060

I also have an IPv4 version of that:

[transport-tcp-ipv4]
type=transport
protocol=tcp
bind=10.75.22.8:5060

I've then configured an endpoint to use it:

[outgoing]
type = endpoint
context = default
dtmf_mode = none
disallow = all
allow = all
rtp_symmetric = yes
force_rport = yes
rewrite_contact = yes
direct_media = no
language = en
aors = outgoing
t38_udptl = yes
t38_udptl_ec = none
ice_support=yes
transport=transport-tcp-ipv6

But this seems to result in SDP payloads with ICE not offering any IPv4
candidates:

v=0
o=- 508048280 508048280 IN IP6 2001:1234:5678:abcd::2
s=Asterisk
c=IN IP6 2001:1234:5678:abcd::2
t=0 0
m=audio 14384 RTP/AVP 4 0 8 3 111 112 5 10 118 7 18 110 117 119 97 9 102 115 
116 107
a=ice-ufrag:6eea7b135aa990d714a67931034ac864
a=ice-pwd:0494fccd28b93f8a2b544b4741203e4f
a=candidate:H67c355d6 1 UDP 2130706431 fd31:aeb1:48df::2 14384 typ host
a=candidate:Hc1e19c54 1 UDP 2130706431 2607:abcd:9876:5432::247 14384 typ host
a=candidate:Hf5a91683 1 UDP 2130706431 2001:1234:5678:abcd::2 14384 typ host
a=candidate:Hdccea0f2 1 UDP 2130706431 2001:123:ab:123::2 14384 typ host
a=candidate:Hcbb5ed22 1 UDP 2130706431 fe80::21f:c6ff:fec4:926a 14384 typ host
a=candidate:H67c355d6 2 UDP 2130706430 fd31:aeb1:48df::2 14385 typ host
a=candidate:Hc1e19c54 2 UDP 2130706430 2607:abcd:9876:5432::247 14385 typ host
a=candidate:Hf5a91683 2 UDP 2130706430 2001:1234:5678:abcd::2 14385 typ host
a=candidate:Hdccea0f2 2 UDP 2130706430 2001:123:ab:123::2 14385 typ host
a=candidate:Hcbb5ed22 2 UDP 2130706430 fe80::21f:c6ff:fec4:926a 14385 typ host
a=rtpmap:4 G723/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:112 AAL2-G726-32/8000
a=rtpmap:5 DVI4/8000
a=rtpmap:10 L16/8000
a=rtpmap:118 L16/16000
a=rtpmap:7 LPC/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:110 speex/8000
a=rtpmap:117 speex/16000
a=rtpmap:119 speex/32000
a=rtpmap:97 iLBC/8000
a=rtpmap:9 G722/8000
a=rtpmap:102 G7221/16000
a=fmtp:102 bitrate=32000
a=rtpmap:115 G7221/32000
a=fmtp:115 bitrate=48000
a=rtpmap:116 G719/48000
a=rtpmap:107 opus/48000/2
a=ptime:20
a=maxptime:20
a=sendrecv
m=video 11188 RTP/AVP 31 34 103 99 104 100 108
a=ice-ufrag:28e29ae16a4cc8d54ebf03cf56010f1a
a=ice-pwd:57ec01cf24ac689d2fb459bd0411d2b6
a=candidate:H67c355d6 1 UDP 2130706431 fd31:aeb1:48df::2 11188 typ host
a=candidate:Hc1e19c54 1 UDP 2130706431 2607:abcd:9876:5432::247 11188 typ host
a=candidate:Hf5a91683 1 UDP 2130706431 2001:1234:5678:abcd::2 11188 typ host
a=candidate:Hdccea0f2 1 UDP 2130706431 2001:123:ab:123::2 11188 typ host
a=candidate:Hcbb5ed22 1 UDP 2130706431 fe80::21f:c6ff:fec4:926a 11188 typ host
a=candidate:H67c355d6 2 UDP 2130706430 fd31:aeb1:48df::2 11189 typ host
a=candidate:Hc1e19c54 2 UDP 2130706430 2607:abcd:9876:5432::247 11189 typ host
a=candidate:Hf5a91683 2 UDP 2130706430 2001:1234:5678:abcd::2 11189 typ host
a=candidate:Hdccea0f2 2 UDP 2130706430 2001:123:ab:123::2 11189 typ host
a=candidate:Hcbb5ed22 2 UDP 2130706430 fe80::21f:c6ff:fec4:926a 11189 typ host
a=rtpmap:31 H261/9
a=rtpmap:34 H263/9
a=rtpmap:103 h263-1998/9
a=rtpmap:99 H264/9
a=rtpmap:104 MP4V-ES/9
a=rtpmap:100 VP8/9
a=rtpmap:108 VP9/9
a=sendrecv

But other endpoints where I don't specify a transport, I get both IPv4
and IPv6 candidates in the ICE SDP.

Presumably the problem with the [outgoing] endpoint is the
specification of an IPv6-TCP transport.  But I need to force the use of
TCP, so how can I do that without limiting it to a particular IP
protocol?

I can't seem to define a generic TCP transport:

[transport-tcp]
type=transport
protocol=tcp

in addition to the ones I have already defined above but I do need to
define the IPv4 and IPv6 transports as I need to bind them to specific
addresses.

Any ideas?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] Message: Authentication failed on manager interface

2019-04-04 Thread Brian J. Murrell
On Thu, 2019-04-04 at 15:08 +0200, Antony Stone wrote:
> 
> It's not "Password", it's "Secret" :)

Ha ha.  I knew it would be a head-smack type problem.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] Message: Authentication failed on manager interface

2019-04-04 Thread Brian J. Murrell
I'm not sure how much more simple I can make this but I just cannot
seem to get my Asterisk 13 to accept a connection on the manager
interface:

--- manager.conf ---
[general]
enabled = yes

port = 5038
bindaddr = 127.0.0.1

[myasterisk]
secret=a
permit=0.0.0.0/0.0.0.0

read = all
write = all

So, couldn't be any more wide open and simpler to connect yet:

# echo -e "Action: Login\r\nUsername: myasterisk\r\nPassword: a\r\n\r\n" | ncat 
127.0.0.1 5038
Asterisk Call Manager/2.10.4
Response: Error
Message: Authentication failed

Even more basically if you like:

# telnet 127.0.0.1 5038
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Asterisk Call Manager/2.10.4
Action: Login
Username: myasterisk
Password: a

Response: Error
Message: Authentication failed

Connection closed by foreign host.

I have restarted asterisk after editing manager.conf, even though a
manager reload should be all that's needed.

server*CLI> manager show user myasterisk

  username: myasterisk
secret: 
   ACL: yes
 read perm: 
system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate,agi,cc,aoc,test,security,message,all
write perm: 
system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr,dialplan,originate,agi,cc,aoc,test,security,message,all
   displayconnects: yes
allowmultiplelogin: yes
 Variables: 

I know this is going to be a "head smack" problem, but seriously.  What
am I missing?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] best practices for dialing multiple contacts of multiple extensions

2019-03-08 Thread Brian J. Murrell
On Thu, 2019-02-21 at 11:17 -0500, Brian J. Murrell wrote:
> In the past, I have created variables that hold multiple extensions
> such as:
> 
> HOUSEPHONES=PJSIP/mom/grandma
> 
> so that I can do a Dial(${HOUSEPHONES},...) with it, to ring multiple
> phones.
> 
> But now some of those phones will be registering multiple times and
> thus have multiple contacts, so I want to use ${PJSIP_DIAL_CONTACTS()
> to expand all of the contacts of an endpoint.
> 
> But of course you can't pass a string such as what's in
> ${HOUSEPHONES}
> to ${PJSIP_DIAL_CONTACTS()}.
> 
> I wonder what others are doing about this?
> 
> I had considered:
> 
> HOUSEPHONES=PJSIP/mom&${PJSIP_DIAL_CONTACTS(grandma)}
> 
> but I suspect that that just adds the contacts for grandma at the
> time
> the dialplan is loaded and is not updated as her contacts actually
> change.  Correct?
> 
> I could imagine a bunch of "dialplan" code to break up a & separated
> string, strip off the PJSIP/ and then run each item through
> ${PJSIP_DIAL_CONTACTS()} and concatenate it all back together with
> 
> 
> Even in AEL (which is probably what I'd do it in) it seems like this
> could be a bit hairy and possibly somebody else must have invented
> this
> while already.
> 
> Or is there some other best known practice to handle all of this that
> I
> am not considering?

Since nobody offered up any BPs, I will provide the AEL macro that I
wrote to do this expansion:

macro expand_exten(ext) {
while ("${ext}" != "") {
Set(e=${SHIFT(ext,&)});
if ("${e:0:5}" = "PJSIP") {
Set(e=${PJSIP_DIAL_CONTACTS(${STRREPLACE(e,PJSIP/,)})});
} 
if ("${e}" != "") {
Set(newext=${newext}${e}&);
}
}
// blech!  global variables because there no way to make a
// function/gosub/etc that returns a value
Set(newext=${newext:0:-1});
Return(${newext});
return;
}

where the first argument passed in is an extention of the format:

PJSIP/

I'm pretty new to AEL, so any constructive criticism would be welcome.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] pjsip: don't require authentication from remote i register to

2019-03-01 Thread Brian J. Murrell
On Fri, 2019-03-01 at 15:54 -0500, Joshua C. Colp wrote:
> 
> That's correct. You'd either need to retrieve the line parameter from
> the outbound registration or forge the source IP address,

Can I eliminate the identify by IP address then, given that my ITSP is
supporting the line parameter?  Or make even better, require them both
to be identified?

> and as you stated the scope of what they can do is limited.

I guess this is just a risk that everyone lives with.  As a limited
scope risk, anyway.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] pjsip: don't require authentication from remote i register to

2019-03-01 Thread Brian J. Murrell
On Fri, 2019-03-01 at 15:41 -0500, Joshua C. Colp wrote:
> 
> I don't understand what you mean. Your ITSP has stated that they
> don't want you to do authentication with them, so you can't.

They are implying, as I am understanding them, that somehow SIP packets
they send me shouldn't need to be authenticated because they are
associated (i.e. "identify"ed in pjsip nomenclature) with my
registration to them.  It all sounds suspect to me but that's what I am
understanding them to be saying.

Ultimately, if I have this endpoint and it's unauthenticated, does it
create a security risk?

I suppose anyone could forge a UDP packet as coming from their IP
address, and as it's "identify"ed by IP on my side and I would accept
it without authentication being necessary.

But then I suppose they are only getting access to being able to
connect into an incoming dialplan context, so ringing extensions here,
but not being able to launch in and outbound (money costing) phone
call, at least without there being dialplan support to make outgoing
calls when calling in (i.e. like a calling card application or
somesuch, which should have it's own authentication anyway).

> If you are referring to the template - it's a template so by itself
> does not create an endpoint.

Yes, completely understood.

b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] pjsip: don't require authentication from remote i register to

2019-03-01 Thread Brian J. Murrell
On Fri, 2019-03-01 at 14:15 -0500, Joshua C. Colp wrote:
> you can try line functionality on the outbound registration which
> may or may not work[2] (requires the upstream to adhere to the RFC,
> which not all do).

My provider seems to implement this.

However even with the line=... in the:

SIP to address: sip:551212@:5060;line=dpnlyiu

res_pjsip is still sending a 401 challenge.

Removing the:

auth=itsp-auth

from my endpoint [template]:

[itsp-endpoint](!)

Has stopped pjsip from sending a 401 when my ITSP sends a SIP MESSAGE,
but do I really want to have that endpoint without authentication?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] pjsip: don't require authentication from remote i register to

2019-03-01 Thread Brian J. Murrell
On Fri, 2019-03-01 at 14:15 -0500, Joshua C. Colp wrote:
> 
> You either configure IP based matching using an identify section[1] 

That's what I did:

[itsp]
type=registration
transport=transport-udp
outbound_auth=itsp-auth
server_uri=sip:pop1.itsp.example.com
client_uri=sip:x...@pop1.itsp.example.com

[itsp-auth]
type=auth
auth_type=userpass
password=XXX
username=XXX

[itsp-endpoint](!)
type=endpoint
transport=transport-udp
context=from-itsp
message_context=messages
disallow=all
allow=ulaw
from_user=XXX
outbound_auth=itsp-auth
auth=itsp-auth
send_pai=yes

[itsp-aor](!)
type=aor
qualify_frequency=15

[itsp-pop1](itsp-endpoint)
aors=itsp-pop1
[itsp-pop1](itsp-aor)
contact=sip:x...@pop1.itsp.example.com:5060

[itsp-pop1]
type=identify
endpoint=itsp-pop1
;match=pop1.itsp.example.com
match=192.168.5.6

but SIP INVITE and SIP MESSAGE packets coming from 192.168.5.6 are
still being challenged with 401 and not even printing any
errors/warnings in the console about not being able to find an
endpoint.

> or you can try line functionality on the outbound registration which
> may or may not work[2] (requires the upstream to adhere to the RFC,
> which not all do).

I'll read up on that and try in the meanwhile.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] pjsip: don't require authentication from remote i register to

2019-03-01 Thread Brian J. Murrell
I'm being told by my ITSP that my Asterisk shouldn't be challenging
their system to authenticate (i.e. a 401 response) when they send me a
SIP MESSAGE (or I suppose a SIP INVITE for that matter).

But I'm not sure what a pjsip.conf configuration for that looks like.

How does one associate an incoming call/message with an existing
authenticated outgoing registration so that Asterisk doesn't return a
401 requiring authentication?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] PJSIP: 481 Call/Transaction Does Not Exist (only) for MESSAGE method

2019-02-22 Thread Brian J. Murrell
On Sun, 2019-02-17 at 17:31 -0500, Brian J. Murrell wrote:
> I have a PJSIP trunk set up which works fine for voice.  I can call
> out
> and I receive calls from it once it registers.
> 
> What isn't working though is receiving MESSAGE (i.e. SIP SIMPLE)
> events.  It was working earlier today but I seem to have done
> something
> as I was enabling voice on the trunk to mess it up.  On receiving of
> a
> MESSAGE, my Asterisk sends a 401 for the ITSP to authenticate it's
> message, which it does, to which my Asterisk responds with a "481
> Call/Transaction Does Not Exist" and displays nothing at all in the
> console.

Nobody has any idea about this?  :-(

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] best practices for dialing multiple contacts of multiple extensions

2019-02-21 Thread Brian J. Murrell
In the past, I have created variables that hold multiple extensions
such as:

HOUSEPHONES=PJSIP/mom/grandma

so that I can do a Dial(${HOUSEPHONES},...) with it, to ring multiple
phones.

But now some of those phones will be registering multiple times and
thus have multiple contacts, so I want to use ${PJSIP_DIAL_CONTACTS()
to expand all of the contacts of an endpoint.

But of course you can't pass a string such as what's in ${HOUSEPHONES}
to ${PJSIP_DIAL_CONTACTS()}.

I wonder what others are doing about this?

I had considered:

HOUSEPHONES=PJSIP/mom&${PJSIP_DIAL_CONTACTS(grandma)}

but I suspect that that just adds the contacts for grandma at the time
the dialplan is loaded and is not updated as her contacts actually
change.  Correct?

I could imagine a bunch of "dialplan" code to break up a & separated
string, strip off the PJSIP/ and then run each item through
${PJSIP_DIAL_CONTACTS()} and concatenate it all back together with 

Even in AEL (which is probably what I'd do it in) it seems like this
could be a bit hairy and possibly somebody else must have invented this
while already.

Or is there some other best known practice to handle all of this that I
am not considering?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] branching in extensions.conf?

2019-02-20 Thread Brian J. Murrell
On Wed, 2019-02-20 at 12:38 -0700, John Kiniston wrote:
> I don't see any other messages in this thread other than your initial
> one
> and my response, perhaps the listserv hasn't relayed it to me yet.

I started a new thread:

http://lists.digium.com/pipermail/asterisk-users/2019-February/293668.html

since it was a separate question and only tangentially related to this
one.

> I switch between ExecIf/GotoIf/GosubIf and the IF function as needed
> in my
> dialplan design, if It's just a one liner I'll usually use either the
> IF
> function or the ExecIf,

Yeah, ExecIf was the suggested workaround in the companion thread
mentioned above.

> I've not run into any problem with colons in my IF statements but I
> don't
> think that's something I've had to work with/around before.

Likely that's just it.  I've only just run into it for the first time
now after many years of Asterisk.

> Shoot, I must have erased the colon when I was trying to fix the
> parentheses.

NP.  I understood your proposal.

> It seems like these days everyone wants to use ARI, You could always
> send
> the call into Stasis and handle your logic in a language of your
> choice but
> that's a whole different discussion.

Yeah.  extensions.conf is starting to feel long-in-the-tooth these
days.  :-)

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] branching in extensions.conf?

2019-02-20 Thread Brian J. Murrell
On Wed, 2019-02-20 at 11:46 -0700, John Kiniston wrote:
> Use the IF function to evaluate and change the dial command directly.

Thanks for taking the time, but that doesn't actually answer the
question I asked.  It in fact answers the caveat I specifically
mentioned:

> Granted the particular above example could probably be better
> written to simply modify $ARG2 based on ${SIP} rather than having two
> Dial() branches

But I also stated that I was just using it as example of a need to
branch and how cumbersome using Goto[If] makes it.

Again, appreciate that you took the time, but really looking for an
answer to the "better way to branch" question.

> My braces and parens may be off in this example sorry if it doesn't
> work
> out of the box.
> exten => s,n,Dial(${IF($["${SIP}" = "PJSIP"]?
> ${PJSIP_DIAL_CONTACTS(${STRREPLACE(ARG2,"PJSIP/","")})}{ARG2})},20,Tt
> Ww)

Hah.  This won't work either, for the reason I asked about in my
followup question about where the "true" value of an ${IF ...}has a
colon in it and is taken to be the end of the true value and the start
of the false value.

And your ${IF ...} is missing the colon between the true and false
values but I still understood what you were getting at.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] if function when the true value has a colon in it?

2019-02-20 Thread Brian J. Murrell
Following up on my previously asked question if I rewrite the branching
example (not that it negates the more general branching question) I was
using as such:

exten => 
s,n,Set(EXT=${IF($[${SIP}=PJSIP]?${PJSIP_DIAL_CONTACTS(${STRREPLACE(ARG2,PJSIP/,)})}:${ARG2})})
exten => s,n,Dial(${EXT},20,TtWw)
exten => s,n,Goto(s-${DIALSTATUS},1)

But that ${IF expression?tval:fval} doesn't work because tval has a :
in it which the if function is taking as the terminator for the tval.

How can I deal with that?  Double quoting the tval doesn't seem to work
as it introduces an unwanted close-double-quote into EXT which Dial()
barfs at.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] branching in extensions.conf?

2019-02-20 Thread Brian J. Murrell
Is there any less cumbersome way of doing conditionalized/branching in
extensions.conf other than something like:

exten => s,n,GotoIf($["${SIP}" = "PJSIP" ]?pjsip)
exten => s,n,Dial(${ARG2},20,TtWw)
exten => s,n,Goto(afterdial)
exten => 
s,n(pjsip),Dial(${PJSIP_DIAL_CONTACTS(${STRREPLACE(ARG2,"PJSIP/","")})},20,TtWw)
exten => s,n(afterdial),Goto(s-${DIALSTATUS},1)

Granted the particular above example could probably be better written
to simply modify $ARG2 based on ${SIP} rather than having two Dial()
branches, but using the above as just an example for wanting to have
branches, is there a less cumbersome way?

Cheers,
b.


signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] PJSIP: 481 Call/Transaction Does Not Exist (only) for MESSAGE method

2019-02-17 Thread Brian J. Murrell
I have a PJSIP trunk set up which works fine for voice.  I can call out
and I receive calls from it once it registers.

What isn't working though is receiving MESSAGE (i.e. SIP SIMPLE)
events.  It was working earlier today but I seem to have done something
as I was enabling voice on the trunk to mess it up.  On receiving of a
MESSAGE, my Asterisk sends a 401 for the ITSP to authenticate it's
message, which it does, to which my Asterisk responds with a "481
Call/Transaction Does Not Exist" and displays nothing at all in the
console.

The configuration of the ITSP is:

[trunk]
type=registration
transport=transport-udp
outbound_auth=trunk-auth
server_uri=sip:itsp.example.com
client_uri=sip:use...@itsp.example.com

[trunk-auth]
type=auth
auth_type=userpass
password=
username=userid

[trunk-endpoint](!)
type=endpoint
transport=transport-udp
context=from-trunk
message_context=messages
disallow=all
allow=ulaw
from_user=userid
outbound_auth=trunk-auth
auth=trunk-auth
send_pai=yes

[trunk-aor](!)
type=aor
qualify_frequency=15

[trunk-foo](trunk-endpoint)
aors=trunk-foo
[trunk-foo](trunk-aor)
contact=sip:use...@itsp.example.com:5060

[trunk-foo]
type=identify
endpoint=trunk-foo
match=itsp.example.com

The SIP conversation when the ITSP is trying to send the MESSAGE:

<--- Received SIP request (456 bytes) from UDP:10.0.0.1:5060 --->
MESSAGE sip:s@10.75.22.8:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.1:5060;branch=z9hG4bK51d6d4da;rport
Max-Forwards: 70
From: "551212" ;tag=as6c34cb69
To: 
Contact: 
Call-ID: 3e9735b4313e58f90b4b61c82f392c2e@10.0.0.1:5060
CSeq: 102 MESSAGE
User-Agent: itsp.example.com
X-SMS-To: 5551234567
Content-Type: text/plain;charset=UTF-8
Content-Length: 1

test message
<--- Transmitting SIP response (515 bytes) to UDP:10.0.0.1:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 
10.0.0.1:5060;rport=5060;received=10.0.0.1;branch=z9hG4bK51d6d4da
Call-ID: 3e9735b4313e58f90b4b61c82f392c2e@10.0.0.1:5060
From: "551212" ;tag=as6c34cb69
To: ;tag=z9hG4bK51d6d4da
CSeq: 102 MESSAGE
WWW-Authenticate: Digest 
realm="asterisk",nonce="1550441754/[redacted]",opaque="2c504a1035f74a1d",algorithm=md5,qop="auth"
Server: Asterisk PBX 13.25.0
Content-Length:  0


<--- Received SIP request (707 bytes) from UDP:10.0.0.1:5060 --->
MESSAGE sip:s@10.75.22.8:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.1:5060;branch=z9hG4bK516e2ba7;rport
Max-Forwards: 70
From: "551212" ;tag=as6c34cb69
To: ;tag=z9hG4bK51d6d4da
Call-ID: 3e9735b4313e58f90b4b61c82f392c2e@10.0.0.1:5060
CSeq: 103 MESSAGE
User-Agent: itsp.example.com
Proxy-Authorization: Digest username="userid", realm="asterisk", algorithm=MD5, 
uri="sip:s@172.1.2.3:5060", nonce="1550441754/[redacted]", 
response="[redacted]", opaque="2c504a1035f74a1d", qop=auth, cnonce="544772bb", 
nc=0002
X-SMS-To: 5551234567
Content-Type: text/plain;charset=UTF-8
Content-Length: 1

c
<--- Transmitting SIP response (388 bytes) to UDP:10.0.0.1:5060 --->
SIP/2.0 481 Call/Transaction Does Not Exist
Via: SIP/2.0/UDP 
10.0.0.1:5060;rport=5060;received=10.0.0.1;branch=z9hG4bK516e2ba7
Call-ID: 3e9735b4313e58f90b4b61c82f392c2e@10.0.0.1:5060
From: "551212" ;tag=as6c34cb69
To: ;tag=z9hG4bK51d6d4da
CSeq: 103 MESSAGE
Server: Asterisk PBX 13.25.0
Content-Length:  0

I couldn't find any solutions to a 481 in response to a MESSAGE after
much searching.

I know MESSAGE does work, as I had it working earlier today.  I just
seemed to have messed it up adding the additional configuration to the
trunk to support incoming and outgoing calls.

Any ideas?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] INVITE from DID: No matching endpoint found but completes the call anyway

2019-01-28 Thread Brian J. Murrell
On Mon, 2019-01-28 at 07:29 -0700, George Joseph wrote:
> When you have an "identify" object configured, you should just use
> "ip" as
> the "identify_by",

But isn't ip the highest priory check in the default value of
endpoint_identifier_order and by extension, wouldn't an endpoint
without an "identify_by" implicitly be treated as "identify_by=ip"?

So isn't my existing configuring already implicitly using
"identify_by=ip"?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] INVITE from DID: No matching endpoint found but completes the call anyway

2019-01-28 Thread Brian J. Murrell
On Mon, 2019-01-28 at 07:29 -0700, George Joseph wrote:
> 
> What version of Asterisk

13.11.1

I know, I could stand to upgrade.

> and what's the value of the "identify_by"
> parameter for the endpoint?

It doesn't have one. I guess you are implying it should have one.

> When you have an "identify" object configured, you should just use
> "ip" as
> the "identify_by",

I see.  OK.  Will give that a try.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] INVITE from DID: No matching endpoint found but completes the call anyway

2019-01-26 Thread Brian J. Murrell
I have a trunk set up for the DID from my provider:

[my_provider]
type=registration
outbound_auth=my_provider
server_uri=sip:sip.example.com
client_uri=sip:my_usern...@sip.example.com
retry_interval=60
 
[my_provider]
type=auth
auth_type=userpass
password=123456
username=my_username
 
[my_provider]
type=aor
contact=sip:sip.example.com:5060
 
[my_provider]
type=endpoint
context=from-my_provider
disallow=all
allow=ulaw
outbound_auth=my_provider
aors=my_provider
 
[my_provider]
type=identify
endpoint=my_provider
match=sip.example.com

And it registers fine:

 

==

 mytrunk/sip:sip.example.com my_provider   
Registered  


And when it gets an INVITE from my provider (192.168.0.1):

<--- Received SIP request (997 bytes) from UDP:192.168.0.1:5060 --->
INVITE sip:1235551212@10.75.22.5:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK06d035fd;rport
Max-Forwards: 70
From: "Fred Flintstone" ;tag=as539f9476
To: 
Contact: 
Call-ID: 3ef877dc4477d8ce4aae29965c5d0875@192.168.0.1:5060
CSeq: 102 INVITE
User-Agent: foobar
Date: Sat, 26 Jan 2019 17:40:00 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
PUBLISH, MESSAGE
Supported: replaces, timer
Remote-Party-ID: "Fred Flintstone" 
;party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length: 295

[SDP redacted]

It logs an error:

[Jan 26 12:40:00] NOTICE[21775]: res_pjsip/pjsip_distributor.c:525 
log_failed_request: Request 'INVITE' from '"Fred Flintstone" 
' failed for '192.168.0.1:5060' (callid: 
3ef877dc4477d8ce4aae29965c5d0875@192.168.0.1:5060) - No matching endpoint found

But then goes on to complete the call:

<--- Transmitting SIP response (352 bytes) to UDP:192.168.0.1:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 
192.168.0.1:5060;rport=5060;received=192.168.0.1;branch=z9hG4bK06d035fd
Call-ID: 3ef877dc4477d8ce4aae29965c5d0875@192.168.0.1:5060
From: "Fred Flintstone" ;tag=as539f9476
To: 
CSeq: 102 INVITE
Server: Asterisk PBX 13.11.1
Content-Length:  0

[ launch into dialplan ]

So why the spurious error when it was able to complete the call?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] (NAT) direct media to host on local net when registering from external address

2019-01-15 Thread Brian J. Murrell
On Tue, 2019-01-15 at 12:01 -0500, Joshua C. Colp wrote:
> 
> The chan_sip module has this implemented under the "nat" option using
> "comedia" as I recall.

Yeah.  The help for which reads:

Send media to the port Asterisk received it from regardless
of where the SDP says to send it.

> It causes media to be sent to where media was originally received
> from.

Right.  But this is the part I don't think I'm understanding.  What is
"originally received from"?  There is no media at the point where the
media session is being set up according the the SDP is there?

> As for whether it would work or not... this all ultimately depends on
> how exactly the intermediary behaves, what is let through, what is
> altered.  There's nothing inherent in either chan_sip or chan_pjsip
> to know/care, as it's just SIP. You'd need to look at the SIP
> signaling and the SDP to understand what is happening.

I have looked.  Asterisk on my LAN is sending an INVITE to the mobile
client and since the INVITE is being sent to an external IP, it is
(correctly for all other cases) writing the external IP into the SDP
payload.  What else could/should I be looking for?

Ultimately I don't think comedia is the problem or solution because
it's not where Asterisk is sending it's media that is the problem.

The problem is that Asterisk is sending an INVITE to the client with
it's external IP address in the SDP because it sees the client as being
external and the client is then correctly trying to set up the media
session with the external IP address of the Asterisk instead of it's
internal address.

What needs to happen is that Asterisk has to know "somehow" that even
though the client registered from an external address, that it really
is internal.  Probably that "somehow" doesn't actually exist at this
point.

Let me ask this, in the REGISTER request, where is the IP address of
the client taken from?  Is it taken from the Via: header?

b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] (NAT) direct media to host on local net when registering from external address

2019-01-15 Thread Brian J. Murrell
On Tue, 2019-01-15 at 09:00 -0700, John Kiniston wrote:
>  How is your endpoint currently configured in asterisk?

It's configured as a chan_sip peer.

> Have you tried
> rtp_symmetric to see if the endpoint sends audio to asterisk if
> asterisk
> can send audio back to the client?

That would require using chan_pjsip wouldn't it?  Not that I am opposed
to trying that.  I need to use chan_pjsip at some point to be able to
authenticate to my SIP provider for SIP SIMPLE anyway.

But will rtp_symmetric really solve the problem?  Isn't the problem the
setting up of the RTP session, so there is no address and port that it
receives from yet?

> Alternatively if your SIP Proxy is also a Media proxy you could set
> the
> media_address on the endpoint to be your proxy and let your proxy
> handle
> proxying the media to your endpoint.

The idea of sending my media out of the LAN (where I have almost zero
latency) and introducing the latency of a round trip to the proxy and
back doesn't seem like a great solution.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] (NAT) direct media to host on local net when registering from external address

2019-01-15 Thread Brian J. Murrell
This is going to be a bit of an odd situation, but perhaps might become
more and more common (as mobile phone SIP clients utilize PUSH proxies
instead of the battery draining direct registering with SIP servers).

I have a SIP client which can be on the same RFC-1918 LAN as my
Asterisk server.  Even though it's on the same LAN as the Asterisk
server, it's registration comes from an IP address external to the LAN.
This is because the client is registering to the local Asterisk server
through a SIP proxy server that is external to the LAN.

Is there any way for Asterisk to determine that this is what is
happening and to direct/setup the media session to the client on it's
LAN address?

Put another way, even though the registration comes from an external
(NATted) IP address, I want the media connection to stay within the
LAN.

One solution of course is to add the external IP address of the SIP
proxy -- the address that the client's registration is coming from --
to localnet but that breaks the use-case of the SIP client (which is
mobile) leaving the LAN and having an external IP address.

Ultimately I am hoping there is something in the registration that will
indicate to Asterisk that even though the registration is coming from
an external IP address, the client has an internal IP address that is
on the same network as it is and sets the IP address in the SDP payload
to a local IP address.

I do realize this is fairly non-standard configuration so it might not
be possible.

Any suggestions would be welcome.

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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] messagesend to SIP peer in sip.conf (or otherwise authenticated)

2018-10-01 Thread Brian J. Murrell
Hi,

I want to be able to send SIP SIMPLE messages via/to my VOIP provider
but in trying to do so with MessageSend() I am getting 401 errors back
from them, unsurprisingly.  They want such messages from me
authenticated with my account just as they would for SIP voice calls.

For voice calls, of course I use Dial(SIP/remote@peer) where remote is
the phone number I want to call and peer is my SIP provider's entry
from my sip.conf complete with account and password.

So how do I achieve the same thing with MessageSend()?  When I try to
use the same kind of recipient string I get an error:

[Oct  1 09:48:40] WARNING[3286][C-13ab]: message.c:1232 msg_send_exec: No 
message technology 'SIP/sms-number@sip-peer' found.

Using MessageSend() with raw URLs (sip:
sms-num...@sip-provider.example.com) is accepted by Asterisk but it
provides no authentication to the MESSAGE command sent to sip-
provider.example.com so is rejected.

So how can I, preferably, use my existing sip.conf entries to send SIP
SIMPLE messages, or at least provide some kind of authentication
otherwise with MessageSend()?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] FILTER function and multiple ranges?

2011-04-25 Thread Brian J. Murrell
I am trying to use the FILTER() function to strip out / from a CID
name.  I have the following in my extensions.conf where I want to
perform the filtering:

exten = s,n,Set(NAME=${FILTER(\x20-\x2e\x30-\7d,${DIAL_NAME})})

However, when ${DIAL_NAME} is, say, J  J DOE the string resulting
from the FILTER() is.  It would appear that only the first range
is being considered.  Do I have the syntax for FILTER() correct?  If so,
is the result that I am seeing the intended behavior or a bug?

Cheers,
b.



signature.asc
Description: OpenPGP digital signature
--
_
-- 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

[asterisk-users] dial extension and play sound file from shell on asterisk server?

2010-04-08 Thread Brian J. Murrell
I want to use Asterisk as a general message delivery system here.

That is, I want to be able to have a (shell, perl, etc.) script on my
Asterisk server dial an extension, wait for it to be answered and then
play a sound file and then hang up, or even wait for a response or
reactions to some IVR.

Certainly if I had a SIP library, I could have the script simply look
like a SIP extension but that seems like it should be an unnecessary
added complication.  Instead I am looking for a more direct API to
Asterisk which allows a process to interact like a phone but not
actually be one.

Is this at all possible?  Anyone done anything like this?

b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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

[asterisk-users] Asterisk as a skinny/sccp client?

2010-03-17 Thread Brian J. Murrell
I wonder if Asterisk's skinny/sccp channel driver could be used as a
client to register with a Cisco PBX.  That is, along with a SIP
client, say, have Asterisk and said SIP client stand in for a Cisco
phone, or an IP Communicator.

Anyone done this?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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

Re: [asterisk-users] Asterisk as a skinny/sccp client?

2010-03-17 Thread Brian J. Murrell
On Wed, 2010-03-17 at 10:56 -0500, Jason Parker wrote: 
 
 No, this isn't currently possible.

Damn.

 I did ponder this for a while, but my 
 conclusion was that the effort required to do so would far outweigh any 
 benefit 
 you'd gain from it.

How about having something -- anything on Linux, able to connect to a
Cisco PBX using Skinny, where one has no other options?

 Cisco has been moving to SIP for a very long time.  There aren't any phone 
 features that Asterisk could emulate that would make this any better than SIP 
 (or even anything approaching parity).

Perhaps not, but there are still installations where all they are using
is Skinny and nothing else.

You don't need to tell me about the pros/cons of this as I have no
control over what they are doing.  I am just a consumer of it.

Unfortunately, I think Asterisk and skinny is about as close as anything
is on Linux to utilizing SCCP.  :-(

b.




signature.asc
Description: This is a digitally signed message part
-- 
_
-- 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

Re: [asterisk-users] soft ATA on linux with zaptel?

2009-01-22 Thread Brian J. Murrell
On Wed, 21 Jan 2009 19:02:01 -0500, Steve Totaro wrote:
 
 Why not just get a softphone and use a USB soundcard or even the onboard
 sound card as your ATA?  Like a MagicJack and SJphone or Xlite or
 whatever it is that works with it.

Please forgive my ignorance but I am not following you.

My problem is this... I have a copper POTS line coming into the house and 
I have an Asterisk server which is incapable of accepting a PCI zap card 
as it has no PCI slots.

I do have a PCI zap card though and I have a Linux machine I could put 
that in to.

So now how do I use a USB soundcard and softphone to bridge the copper 
POTS line to the Asterisk server given that I only have an IP connection 
between the Asterisk server and the machine that has the zap card in it?

b.



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

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


[asterisk-users] soft ATA on linux with zaptel?

2009-01-21 Thread Brian J. Murrell
Slightly OT, but I'm wondering if anyone here has come across a soft 
ATA.  That is, software that will perform the functions of a basic POTS 
line ATA on Linux with a zaptel driven card.

I have a Linux machine with a zaptel card in it and I want to have 
another Linux machine running Asterisk utilize the zaptel card in the 
first Linux machine to make outgoing and receive incoming calls.

I realize I could make Asterisk do this job, but it seems pretty heavy-
weight for just that purpose -- of bridging a POTS line to a SIP (or IAX) 
connection.

Ideas?

b.



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

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


[asterisk-users] any dialplan action on received jabber msgs?

2008-10-28 Thread Brian J. Murrell
So I have (and have had) jabber configured for some time, specifically
for GTalk, but something has occurred to me.  If somebody happens to
send an IM (text) to that account, nobody is going to be receiving it.
I'd like to send a canned message back to any sender of an IM.
Possible?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] hammering imap vmail storage

2008-10-27 Thread Brian J. Murrell
On Mon, 2008-10-27 at 10:11 -0400, Brendan Martens wrote:
 I found this in the sample voicemail.conf:
 
 ;pollmailboxes=no;   If mailboxes are changed anywhere outside of  
 app_voicemail,
 ;; then this option must be enabled for MWI to  
 work.  This
 ;; enables polling mailboxes for changes.   
 Normally, it will
 ;; expect that changes are only made when someone  
 called in
 ;; to one of the voicemail applications.
 ;;   Examples of situations that would require  
 this option are
 ;; web interfaces to voicemail or an email client  
 in the case
 ;; of using IMAP storage.
 ;
 ;pollfreq=30 ;   If the pollmailboxes option is enabled,  
 this option
 ;; sets the polling frequency.  The default is  
 once every
 ;; 30 seconds.
 
 
 Maybe that will help?

I did see that in my research but looking at the app_voicemail.c in my
source pool, 1.4.17 doesn't seem to have such options.  :-(  I have not
done a bisection yet to find which release it was added.  Maybe it was
added in the 1.6 tree given that it was in the 1.6.1 source I found it.

Thanx for taking the time to find that and respond though.  I appreciate
the effort.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] hammering imap vmail storage

2008-10-27 Thread Brian J. Murrell
On Mon, 2008-10-27 at 11:13 -0500, Mark Michelson wrote:
 
 The behavior you are seeing is most likely due to SIP's MWI behavior in 
 Asterisk 
 1.4. The way it works is to poll the mailboxes every so often to see if new 
 messages are available.

Yeah, that sounds like it.

 2. If you want to make MWI checks more infrequent, you can change the 
 checkmwi 
 option in sip.conf to be something other than the default. checkmwi defaults 
 to 
 checking the server for new messages every 10 seconds. If you set this to be 
 something like 60, this should ease the load somewhat.

Sweet.  This seems to have done the trick!

I guess ultimately some caching between the IMAP server and the SIP MWI
would be nice.  Probably that's what the poll* features of newer
app_voicemail's do.

Thanx for the suggestion!

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-users] hammering imap vmail storage

2008-10-25 Thread Brian J. Murrell
I've configured asterisk 1.4 to use imap storage for voice-mail and
while I'm happy with it generally speaking it really seem to hammer the
IMAP server.   It appear, from the IMAP server logs that it's polling
the imap server every *second* for mailbox updates for the users'
voice-mail folders.

Is it really necessary to do this once a second?  Is this tunable
anywhere?

Thanx,
b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] srv records not being honoured properly

2008-10-19 Thread Brian J. Murrell
On Sun, 2008-10-19 at 13:31 +0300, Kevin P. Fleming wrote:
 
 Asterisk 1.6 supports proper SRV record sorting, so that the lookups
 will return the correct record to the module that requested the lookup.

That would be in ast_get_srv() then?  In 1.4.17 I do see weight
processing but not priority processing.  I'd just go look at the code
for 1.6.1 at svn.digium.com but that server does not not seem to be
responding.  Reachable but HTTP requests seem to not be completing.

Strangely enough, I think priority processing is more important than
weight processing.  If I were only going to implement one or the other I
would have chosen priority I think.

 However, the channel drivers still don't maintain any state information
 about records that have failed and then use that to failover to other
 records.

Indeed.  This seemed to be my observation when I took a quick peek at
1.6.1 yesterday.

 There are plans to extend the Asterisk DNS code (dnsmgr) to be
 able to provide this functionality, but like everything else, it's on
 the to-do list :-)

Indeed.  That never ending to-do list.  :-/

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] srv records not being honoured properly

2008-10-19 Thread Brian J. Murrell
On Sun, 2008-10-19 at 21:14 +0300, Kevin P. Fleming wrote:
 
 Never mind... I was mistaken. The srv_callback() function puts the
 records returned by the DNS lookup into priority order (lowest numbers
 first),

Yes, I can see that function and while I have not audited it detail, it
looks as though it was at least intended to sort by priority.

 So, in both Asterisk 1.4 and 1.6, the SRV record lookups
 should choose the lowest-priority, highest-weight entry returned by the
 DNS lookup.

So it seems.  I wonder why I have evidence that it is not actually
working.  Asterisk even told me:

-- ast_get_srv: SRV lookup for '_sip._udp.tollfree.sip-happens.com.' mapped 
to host ares.sip-happens.com, port 5070

And while unfortunately those SRV records don't exist any more (because
I complained to the sip-happens.com guys about their ares server not
working and they just removed the ares record rather than having it at a
lower priority) so we can't test it again, I am positive when I manually
inspected the SRV records sometimes.sip-happens.com had a lower priority
(the first of the two numbers in the RR right?) than
ares.sip-happens.com.

It might be worthwhile writing a small unit test for ast_get_srv that
just calls it 100 times on a set of dns records that should replicate
the problem and see how many times it's correct vs. not correct.  Except
for having to cobble up an ast_channel * it might not be that terribly
difficult.  On second thought (or having tried at least) maybe not.
Just trying to pull main/srv.o into a unit test unravels a whole nest of
dependencies.

 There still isn't any failover, but we are least choosing
 the correct single record from the list in DNS.

Right, which would be the minimum requirement in my mind.  Anything less
and one shouldn't even implement it.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-users] srv records not being honoured properly

2008-10-17 Thread Brian J. Murrell
Given the following SRV records:

_sip._udp.tollfree.sip-happens.com. 38400 IN SRV 10 0 5060 
sometimes.sip-happens.com.
_sip._udp.tollfree.sip-happens.com. 38400 IN SRV 20 0 5070 ares.sip-happens.com.

Why is asterisk (1.4.17) not honouring the priority and not failing over
to using other records when a connection fails?

For a given call to tollfree.sip-happens.com ares.sip-happens.com was
chosen and tried before sometimes.sip-happens.com and additionally, when
the connection to ares.sip-happens.com was being refused there was no
roll-over to sometimes.sip-happens.  Here's what asterisk did:

-- Executing [EMAIL PROTECTED]:23] Dial(SIP/anonymous-b5e02fd0, 
SIP/[EMAIL PROTECTED]||) in new stack
-- ast_get_srv: SRV lookup for '_sip._udp.tollfree.sip-happens.com.' mapped 
to host ares.sip-happens.com, port 5070
-- Called [EMAIL PROTECTED]
[Oct 17 10:15:46] NOTICE[4973]: chan_sip.c:2920 auto_congest: Auto-congesting 
SIP/tollfree.sip-happens.com.-081ddc28
-- SIP/tollfree.sip-happens.com.-081ddc28 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)

And here's the packet trace:

10:15:16.612062 IP 67.193.213.184.5060  209.9.237.93.5070: SIP, length: 855
10:15:16.652721 IP 209.9.237.93  67.193.213.184: ICMP 209.9.237.93 udp port 
5070 unreachable, length 556
10:15:17.613997 IP 67.193.213.184.5060  209.9.237.93.5070: SIP, length: 855
10:15:17.654697 IP 209.9.237.93  67.193.213.184: ICMP 209.9.237.93 udp port 
5070 unreachable, length 556
10:15:18.611068 IP 67.193.213.184.5060  209.9.237.93.5070: SIP, length: 855
10:15:18.652786 IP 209.9.237.93  67.193.213.184: ICMP 209.9.237.93 udp port 
5070 unreachable, length 556
10:15:20.614106 IP 67.193.213.184.5060  209.9.237.93.5070: SIP, length: 855
10:15:20.654785 IP 209.9.237.93  67.193.213.184: ICMP 209.9.237.93 udp port 
5070 unreachable, length 556
10:15:24.614115 IP 67.193.213.184.5060  209.9.237.93.5070: SIP, length: 855
10:15:24.658934 IP 209.9.237.93  67.193.213.184: ICMP 209.9.237.93 udp port 
5070 unreachable, length 556
10:15:32.615275 IP 67.193.213.184.5060  209.9.237.93.5070: SIP, length: 855
10:15:32.668930 IP 209.9.237.93  67.193.213.184: ICMP 209.9.237.93 udp port 
5070 unreachable, length 556
10:15:48.614675 IP 67.193.213.184.5060  209.9.237.93.5070: SIP, length: 855
10:15:48.655403 IP 209.9.237.93  67.193.213.184: ICMP 209.9.237.93 udp port 
5070 unreachable, length 556

So, as you can see, the priority was not honoured, nor was the alternate
SRV record used when there was a connection failure.  Maybe that's
because it was looking for a lower priority.  Is SRV handling in
Asterisk just broken?  Or is this a known and fixed bug?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] srv records not being honoured properly

2008-10-17 Thread Brian J. Murrell
On Fri, 2008-10-17 at 10:32 -0500, Andres wrote:
 
 Because Asterisk does not support that.

Which is just another way of saying Asterisk is broken then.  SRV
records have requirements for their correct use.  If those requirements
are ignored, that is a broken implementation.

 The only thing that Asterisk 
 does is use the first SRV entry

First in terms of what was returned, not sorted by priority and weight,
right?

 but it pays no attention to priorities 
 or weights.  It does not care about other SRV entries either.

Tsk tsk tsk.

 This is 
 how things have been as long as I can remember.

Wonderful.  Nothing like half implementing standards.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] srv records not being honoured properly

2008-10-17 Thread Brian J. Murrell
On Fri, 2008-10-17 at 11:18 -0500, Eric ManxPower Wieling wrote:
 It should be fairly easy to write an AGI script that does the SRV query, 
   do whatever you want with the response, set a channel variable with 
 the results and use that in your dialplan.

Maybe.  If I were an AGI hacker.  But really, should I (and every other
Asterisk user) have to?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] srv records not being honoured properly

2008-10-17 Thread Brian J. Murrell
On Fri, 2008-10-17 at 11:35 -0500, Eric ManxPower Wieling wrote:
 If you fight Asterisk's oddities then you will have a depressing and 
 miserable life.  If you embrace Asterisk's oddities then you will have a 
 joyous and enlightened life. 8-)

I just want something that works.  :-)

 I agree that if Asterisk has SRV support it should work in the way 
 expected.  The reason Asterisk's SRV support has not been fixed is 
 because nobody with the skills has thought the issue was important 
 enough to fix.

~sigh~

 Do you know any programming languages?

I do and I'm pretty sure I could fix the problem.  I just have so much
other stuff to do that I didn't really want to be an Asterisk hacker on
top of all that.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] srv records not being honoured properly

2008-10-17 Thread Brian J. Murrell
On Fri, 2008-10-17 at 12:11 -0500, Tilghman Lesher wrote:
 
 Have you considered upgrading to 1.6?

Not to this point, no.  1.4 does everything I want and if it ain't
broke, don't fix it.  Well, now it's broke I guess.  Still, Ubuntu still
uses 1.4 and I don't like having to maintain my own packages.

   I believe it is fixed in that branch.

I think I'd sooner (backport a) fix (it) and offer it back upstream
before I'd go to maintaining my own packages.  I can do it, I just have
better things to do.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-users] no per mailbox imapfolder override? wow.

2008-10-05 Thread Brian J. Murrell
I'm looking at the app_voicemail.c from both 1.4 and 1.6.1 and seeing
that neither allows an individual mailbox to override the imapfolder
value.  It seems entirely intuitive to me that one might want to do
that, not to mention how trivial it looks to add that to
app_voicemail.c.

Maybe my use-case is wrong though.  Generally, each per-user voicemail
box should be a folder in the same user's IMAP account, and using the
same mailbox name for that is no big deal.

But I also want a general mailbox for people to leave messages when
they don't know or have a particular person in mind.  But in terms of
IMAP, that folder should be in a Shared Folders hierarchy so that
multiple users are able to tend to it.  That requires that I be able to
specify a particular folder in the IMAP server.

Thots?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] OT: real 2 line phone vs. 1 line and call waiting

2008-09-30 Thread Brian J. Murrell
On Tue, 2008-09-30 at 08:23 -0500, Lyle Giese wrote:

 1) a two line phone can register with two different * servers or sip 
 carriers.

Indeed.  But if I only had the one * server which itself registered to
my carriers...

 2) It's easy for both incoming and outgoing to separate business from 
 personal calls. (ie line1 is personal, line2 is business)

Yeah.  Given this is a home office phone though, that I even route the
house calls to it is just a convenience for when I am in the home
office.  IOW, if I'm in the office, I almost always want to answer it
vs. if I am at a personal/house phone, indeed, I may not want to answer
business calls, but this is not the case...

 3) It's easy for a two line phone to register to two different accounts 
 on * and then subsubscribe to two different MWI's on different VM 
 boxes

Ahhh.  Now this is an interesting possibility.

 (again goes back to seperating business from personal or your VM 
 from your significate other's VM)

Ahhh.  Indeed.

This use case is worth considering.  Although, really, I want to migrate
to VM in IMAP so that I don't even (have to) use the phone to know there
is VM or listen to/delete it.  I would use my e-mail client which is my
preferred interface.

In any case, this one is an interesting benefit.

Not sure I'm convinced enough yet though.  That said, thanks for the
input Lyle, I really appreciate your thoughts on that.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] OT: real 2 line phone vs. 1 line and call waiting

2008-09-30 Thread Brian J. Murrell
On Tue, 2008-09-30 at 17:29 -0500, Lyle Giese wrote:
 I have never been convinced that VM via email is a convenence.  You
 have to use the loudspeakers on the PC or headphones, which is not as
 convenient as a handset.

Depends on your working environment I guess.

 Not to mention the privacy issues/problems using loudspeakers for VM. 

In my office, that's not usually a problem.

 Do you want your kids/wife overhearing your customer that is upset
 with you?

Heh.  Fortunately I don't get those kinds of calls.

 I find that the email notification is more than enough to know who
 called and many times why without listening to the actual message and
 deciding how urgent it is to listen to the message or deal with it.

The beauty of IMAP VMail storage is that you get the best of both
worlds.  You get the convenience of your VMs accessible by IMAP if you
want or Asterisk can still access them (in the IMAP store) and do most
of the normal VMail functions on them itself.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

[asterisk-users] OT: real 2 line phone vs. 1 line and call waiting

2008-09-29 Thread Brian J. Murrell
I'm looking into getting a new phone and wondering what the difference
in functionality is between a single line phone with call waiting and a
real 2 line phone (either a real SIP phone or an analog 2 line phone and
a 2 port ATA) is.  Why would I want the real 2 lines vs. just being able
to take an incoming call via call-waiting?

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] FW: Google Alert - dean collins

2008-09-27 Thread Brian J. Murrell
On Sat, 2008-09-27 at 15:11 -0400, Dean Collins wrote:
 Who is Chris Langford in Huntsville Alabama and is he seeking Digium’s
 permission in order to report the asterisk mailing lists out onto the
 internet

Digium's permission?  Does Digium own the copyright on what I write?  I
think not.  I do.  I don't recall assigning any copyright when I joined
the list.

On the other hand I think there is an implicit assignment to the public
domain when you contribute to a ML.

 http://asteriskbizrss.blogspot.com/

 What can be done to stop people doing this and making money out of
 selling ads on these crappy blogsites?

What ads?  I don't see any ads.

Now if you really want to complain about this particular subject you
could start with osdir.com:

http://osdir.com/ml/isdn.i4l.user/2005-09/msg7.html

Although I'm really not sure what you are in a tizzy about.  It seems a
fair trade to get some ad revenue to support the cost of the archiving
which is a convenience to the people who don't want to go to the expense
of archiving everything they might be interested in ever reading
themselves.

I find it surprising that the US economy is on the brink of depression
with an unprecedented $700 billion (and that _billion_ with a B) bailout
of the credit economy and you are complaining about somebody possibly
recouping his expenses for what is arguably a public service.

~sigh~

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] sip forking needed for ekiga 3.0

2008-09-26 Thread Brian J. Murrell
On Fri, 2008-09-26 at 08:43 +0100, Grey Man wrote:
 
 It's not particularly difficult to determine the best IP address for a
 piece of client software to use.

Oh?

 Check the local machines default
 gateway, apply the subnet mask and then compare it against all the
 local IP's.

Yeah?  And if more than one matches?  Then what?

Have you read the whole thread here?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] sip forking needed for ekiga 3.0

2008-09-26 Thread Brian J. Murrell
On Fri, 2008-09-26 at 14:54 +0100, Grey Man wrote:
 On Fri, Sep 26, 2008 at 2:36 PM, Brian J. Murrell [EMAIL PROTECTED] wrote:
 
  Yeah?  And if more than one matches?  Then what?
 
 
 Use one of them!

And if the one I choose to use doesn't work because of some kind of
policy routing or filtering, etc.?

 
 And if the network set up is too complex that that still causes
 problems do what the Ekiga guy told you and set the IP address you
 want to use in the config file.

Uhm.  That's not an option.  There is no option to do that.  Should
there be?  Perhaps.

But hey, I'm just here to report the failure (i.e. to properly accept
multiple legal registrations through this so called SIP forking) that
the Ekiga guys are telling me about.

 I've read enough of the thread to know the Asterisk issue you are
 trying to describe is loop detection and not forking. Asterisk does
 support forking: Dial(SIP/user1SIP/user2) is forking. Not being able
 to handle duplicate requests from different IPs is loop handling and
 you'll already find bugs open about that.

I will relay your description of loop detection back on to the Ekiga
guys.  I'm just the messenger here.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] sip forking needed for ekiga 3.0

2008-09-26 Thread Brian J. Murrell
On Fri, 2008-09-26 at 10:16 -0400, SIP wrote:
 
 The RFCs are there for a reason. All SIP forking is UAS territory. Not
 UAC territory.

From http://bugzilla.gnome.org/show_bug.cgi?id=553810 Damien Sandras
asks:

I repeat, Ekiga is doing something perfectly legal.

The real question is why does Asterisk think it is the same request 
when the
from tag is different ?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] sip forking needed for ekiga 3.0

2008-09-26 Thread Brian J. Murrell
On Fri, 2008-09-26 at 10:41 -0400, SIP wrote:
 Oh yes. It's perfectly legal.
 
 It's also a) NOT SIP forking, b) Lazy, and c) Poorly designed.
 
 Sending multiple requests and hoping and praying that the recipient will
 ignore two of them (it will NOT in many cases -- specifically set out by
 the RFC -- see MESSAGE) because the tag is different doesn't make it any
 less poorly designed just because it's not specifically written that it
 can't be done.

The Ekiga developer points out:

Have a look at this link :
http://www.faqs.org/rfcs/rfc3261.html

And look how an UAS (Asterisk in this case) is supposed to handle merged
requests :
8.2.2.2 Merged Requests

   If the request has no tag in the To header field, the UAS core MUST
   check the request against ongoing transactions.  If the From tag,
   Call-ID, and CSeq exactly match those associated with an ongoing
   transaction, but the request does not match that transaction (based
   on the matching rules in Section 17.2.3), the UAS core SHOULD
   generate a 482 (Loop Detected) response and pass it to the server
   transaction.

  The same request has arrived at the UAS more than once, following
  different paths, most likely due to forking.  The UAS processes
  the first such request received and responds with a 482 (Loop
  Detected) to the rest of them.

In our case, the From tag is different, so it should not detect a loop.

This excerpt show that any client or server should be able to receive 
merged
requests. There is obviously a bug here in Asterisk.

I have no idea how (in-)correct it is, again, just being the messenger.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] Astricon people please post the announcement

2008-09-25 Thread Brian J. Murrell
On Thu, 2008-09-25 at 20:49 +0300, Tzafrir Cohen wrote:
 
 Great news! You mean that there is finally a free implementation of the
 skype protocol so I can start using it?

Free?  AFAICT, not.  Neither free as in beer nor speech.  Move along,
nothing to see here.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

[asterisk-users] sip forking needed for ekiga 3.0

2008-09-25 Thread Brian J. Murrell
So, I have been testing ekiga 3.0 with Asterisk, and sadly, it don't
work.  I am told by the ekiga devs in
http://bugzilla.gnome.org/show_bug.cgi?id=553595 and
http://bugzilla.gnome.org/show_bug.cgi?id=553810 that the problem is
that Asterisk does not support SIP forking.

The issue is that I have multiple addresses on my workstation:

2: eth0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc pfifo_fast qlen 1000
link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet 10.75.22.1/24 brd 10.75.22.255 scope global eth0
inet 10.75.22.101/24 brd 10.75.22.255 scope global secondary eth0:1

So when ekiga (3.0) tries to place a call through Asterisk it in fact
does parallel requests from all addresses.  This is what appears to
confuse Asterisk.  Please see the above tickets for more details.

Thots?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] sip forking needed for ekiga 3.0

2008-09-25 Thread Brian J. Murrell
On Thu, 2008-09-25 at 14:56 -0400, SIP wrote:
 Sending from multiple different points of origin doesn't make any sense
 at all in either a logical or rational fashion. What's it supposed to
 accomplish?

It seems to be a shot-gun approach to making a SIP connection.  The
assumption being I suppose that one or more of the IP aliases will fail
for whatever reason (policy routing, filtering, etc.), so just try them
all, and use the first one to make a completion and drop the others.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] sip forking needed for ekiga 3.0

2008-09-25 Thread Brian J. Murrell
On Thu, 2008-09-25 at 15:31 -0400, SIP wrote:
 That strikes me as being careless and unreliable.

That's one argument.  I can also see the ekiga developers' argument
though and that's to strive for the most automatic functionality
possible.  The less things you have to ask users, the more likely you
are to just work.

 Call me a purist, but 
 I'm of the opinion that you should KNOW which interface to use based on 
 which interface is registered

We are talking about IP aliases here, not real interfaces.

 and choose ONE interface based on the 
 rules you've established during registration.

What rules would you establish during registration?

 What happens if you want 
 to ensure that data goes across a VPN (in order to encrypt your VoIP 
 communications) instead of the public internet?

Presumably you have some [policy] routing that ensures that.  But on the
other hand, if you did have two addresses on an interface, one for VPN
and one for everything else, unless you shotgun out you need to
either know which address to use or ask the user.  Either case may fail.

 That takes all the logic out of the equation and just says, Here's a 
 bunch of packets. Figure out what to do with them. I'll be waiting for 
 your response.

I don't think it's quite that bad.  It's more like here's a bunch of
session requests, please complete them [you don't know it yet, but I'm
going to tear down all but the first one you complete].  But the glitch
is that even though I send you 3 of them, due to [policy] routing and
firewalling, you might only get one.

 There's a reason routing rules exist and mature services allow you to 
 control the interface from which it originates.

Really, I'm just the messenger here.  I doubt the ekiga team and the
asterisk team would be willing to sit down and discuss who is right
here, so I'm trying to be the conduit.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] Astricon people please post the announcement

2008-09-25 Thread Brian J. Murrell
On Thu, 2008-09-25 at 17:25 -0700, Fred Posner wrote:

 
 I talked with both Skype and Digium today at Astricon for a while on this... 
 it's actually going to be amazing.

It's still early, but still, nobody has answered my question as to
whether Skype will be using my Asterisk server's CPU and bandwidth to
bridge calls between anonymous third parties (i.e. two people not
involved in my call plan in any way, just using my Asterisk server as a
bridge for their lame, NATted connectivity) they way they do with their
client.

Y'all do realize with Skype that they bridge calls between two parties
using a third, anonymous, (donor) party, when the two parties cannot
connect to each other because their NAT and/or firewalls are too
restrictive to allow them to connect directly, right?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] ENUM lookup

2008-08-14 Thread Brian J. Murrell
On Thu, 2008-08-14 at 14:15 +0200, Klaus Darilion wrote:
 Use the ENUMLOOKUP function, e.g.:

And take note that it's very naive.  See my previous posting for an enum
AGI that is more intelligent.  The only thing it does not do that I
would like to add is give up on the DNS lookup much earlier than it does
if a DNS server is unresponsive.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] zap not getting callerid any more

2008-07-16 Thread Brian J. Murrell
On Wed, 2008-07-16 at 15:08 +1000, Rob Hillis wrote:
 I hadn't realised this was for a home server... yes I agree, for a home 
 server the Digium or Sangoma cards are a little too expensive.

Indeed.

 I can't speak for the SPA-3102, but the SPA-3000 I use here at home 
 doesn't do a brilliant job.  I suffer from varying amounts of echo on 
 many calls,

Oh, that's sad to hear (NPI).

 I'm sure you'll find it amusing to find out that I was toying with the 
 idea of getting an X100 card for my server.

LOL.

 Unfortunately, they 
 appear to be very hard to find in Australia.

I got mine off of Ebay.  I ended up getting two in fact due to what is
in my opinion Ebay's complicity in fraud.  I was in a bidding war with
somebody on one auction and when he finally bid past my stop limit, I
moved on to another auction and won that one.  Then the bidder that I
was bidding against in the first auction bailed out and left me holding
the bag.

Ebay completely let him do it and didn't respond to any of my complaints
about it (IIRC -- this was 7+ years ago).

Was that person I was bidding against really the seller, driving the
price up and then bailing when he noticed I wasn't willing to go higher
and he was getting his maximum price for it?  I have no proof and will
never really know the answer to that question, but it sure makes me
wonder.

And that Ebay allowed him to bail out of an auction that he clearly won
just stinks and considering they get paid as a percentage of the sale
price squarely puts them into a conflict of interest.

I don't think I've bought anything from Ebay since and I'd never again,
not for anything more than $10 or $20 anyway.

But I digress.  :-)

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] zap not getting callerid any more

2008-07-16 Thread Brian J. Murrell
On Wed, 2008-07-16 at 09:31 -0400, Brian J. Murrell wrote:
 IIRC -- this was 7+ years ago

Er, I mean 2+ years ago, just to keep the facts straight.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] zap not getting callerid any more

2008-07-15 Thread Brian J. Murrell
On Sun, 2008-07-13 at 10:22 -0400, Brian J. Murrell wrote:
 I have a wildcard 100 xp on my pots line and all was working just fine
 up until a few days ago when all of a sudden it stopped receiving caller
 id on incoming calls.  I know caller id is being presented on the line
 as the analog set on the same line always gets it.
...
 rxgain=10.9
 txgain=0.0

To add more information, I tried setting my rxgain back to 0.0 and CID
now seems more reliable.  So again I went through the process of setting
rxgain using a milliwatt number (not at all local however as I can't
find one near me) and ztmonitor and had to adjust it down by 4 points to
10.5 to get it close to the magical 14844.  CID was again, 100%
unreliable.

One thing I have noticed is that in the cases where the wildcard cannot
determine the CID (i.e. because the rxgain is up around 10.5), I get
this in my asterisk console:

[Jul 15 08:04:09] NOTICE[26696]: chan_zap.c:6670 ss_thread: Got event 18 (Ring 
Begin)...

And indeed, Asterisk seems to take longer to pass the call to the
destination extensions, exactly as if it's struggling to get the CID on
the analog line.

Does that message from Asterisk mean anything to anyone?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] zap not getting callerid any more

2008-07-15 Thread Brian J. Murrell
On Tue, 2008-07-15 at 22:31 +1000, Rob Hillis wrote:
 Brian J. Murrell wrote:
  One thing I have noticed is that in the cases where the wildcard cannot
  determine the CID (i.e. because the rxgain is up around 10.5), I get
  this in my asterisk console:
 
  [Jul 15 08:04:09] NOTICE[26696]: chan_zap.c:6670 ss_thread: Got event 18 
  (Ring Begin)...
 
  And indeed, Asterisk seems to take longer to pass the call to the
  destination extensions, exactly as if it's struggling to get the CID on
  the analog line.
 
  Does that message from Asterisk mean anything to anyone?
 
 It means that Asterisk has detected that the line is ringing.

But I don't get that message when the rxgain is low enough for CID to
work, yet the line is still picked up by Asterisk, so Asterisk must
still be detecting the line ringing.  Why does it print that message
only when the rxgain is increased?

 The fact 
 that Asterisk pauses after this indicates that it is waiting to receive 
 caller ID information.

Indeed.

 The chances are that in boosting the receiving 
 audio, you're causing the caller ID information to become distorted - 
 enough so that Zaptel can no longer decode the caller ID properly.

Fair enough, but I'm only increasing to the magical values that are
supposed to be ideal for echo cancellation.  That seems to be a)
incompatible with caller-id and b) it's only when I increase it that
high do I get the Got event 18 (Ring Begin)... message.

Further to (a) above, my rxgain has been at 10.9 for a long time and
everything worked just fine and then one day the CID just stopped
working.  And further to that, a re-calibration to a milliwatt number
showed it was only out by 4 points.  Not very much it seems.

 X100 cards are notorious for problems.

Supposedly, yet.  But mine has been working peachy up until this out of
the blue incident.

 Unless you want to invest in a 
 better card, you may just have to live with the problem.

Which means what, a multiport and multi-hundreds of dollar card?  I'm
just a home user.  I don't have hundreds of dollars to spend on a single
piece of phone hardware.

I wonder how much using something like an SPA-3102 (with both an FXS and
FXO ports) eliminates these problems and brings reliability to the
table.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] zap not getting callerid any more

2008-07-15 Thread Brian J. Murrell
On Tue, 2008-07-15 at 12:49 -0400, Noah Miller wrote:
 
 It is odd that it would work one day and not the next.

Indeed.

 I'd have to
 say, though that I've seen that rxgain/txgain values beyond +-8 seem
 to yield unpredictable results in many areas,

Yeah, I was pretty alarmed months ago when I tuned it to 10.9 to get
that magical 14844, but there was no echo and CID worked, but given
everything was working, didn't really concern myself with it further.

 even if they do get you
 closer to 14844, and that's even on the cool new cards all the kids
 are using these days. And now the obligatory: YMMV

Indeed.  Things seem to be working again with rxgain at 10.0.  Any
attempt to push it closer to that 10.5 (from today's calibration) or
10.9 (calibration of a few months ago) yield CID problems again.

But I still wonder why the higher values result in chan_zap.c:6670
ss_thread: Got event 18 (Ring Begin)... messages and lower values do
not AND YET Asterisk answers the Zap/POTS line in either case.

I can't help but think that message and the lack of CID at the higher,
calibrated value are related.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

[asterisk-users] zap not getting callerid any more

2008-07-13 Thread Brian J. Murrell
I have a wildcard 100 xp on my pots line and all was working just fine
up until a few days ago when all of a sudden it stopped receiving caller
id on incoming calls.  I know caller id is being presented on the line
as the analog set on the same line always gets it.

What is strange is that this all of a sudden started happening out of
the blue.  It was working one day and then not the next.  No asterisk
changes at all in that time frame.

I have the following in my zapata.conf:

signalling=fxs_ks 
usecallerid=yes
cidsignalling=bell
cidstart=ring
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
rxgain=10.9
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
callerid=asreceived
channel = 1

Any ideas what could have happened, or how to go about troubleshooting
this?  Is there some amount of debug I can enable to see why it's
failing?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] Spam Filter

2008-06-30 Thread Brian J. Murrell
On Mon, 2008-06-30 at 12:03 -0400, Andrew Joakimsen wrote:
 Does anyone know of a spam filter that will work with Asterisk?

What does spam have to do with Asterisk?  Or do you mean spit perhaps?

http://en.wikipedia.org/wiki/VoIP_spam ?  Probably the same techniques
such as whilelisting, blacklisting and greylisting are going to have to
be applied.  It will be much more difficult however as there is no
digital form of SPIT that can be analysed before delivery and reported
to clearinghouses.

Then again, isn't SPIT just telemarketing and regulated by the same
(albeit jurisdictionally local) rules such as Do Not Call lists and so
on?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] sip extension compromised, need help blocking brute force attempts

2008-06-30 Thread Brian J. Murrell
On Mon, 2008-06-30 at 11:15 -0500, spectro wrote:
 I need a way to block that IP from connecting to my
 asterisk server, please advice.

netfilter.  aka iptables.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

[asterisk-users] included context not being prioritized properly

2008-06-25 Thread Brian J. Murrell
I have an outbound-ld context as follows:

[ Context 'outbound-ld' created by 'pbx_config' ]
  '_1NXXNXX' = 1. Macro(enumdial|${EXTEN})   [pbx_config]
102. Wait(1)  [pbx_config]
103. Set(LINE=${IF($[${LINE}=pots]?link2voip:${LINE})}) 
[pbx_config]
104. Macro(dial${LINE}|${EXTEN})  [pbx_config]
105. Hangup() [pbx_config]
  Include ='toll-free-override'  [pbx_config]

and toll-free-override has:

  '18002687096' =  1. Macro(dialpots|${EXTEN})   [pbx_config]
  '18009598281' =  1. Macro(dialpots|${EXTEN})   [pbx_config]
  '18664277451' =  1. Macro(dialpots|${EXTEN})   [pbx_config]
  '18668797179' =  1. Macro(dialpots|${EXTEN})   [pbx_config]
  '18884189338' =  1. Macro(dialpots|${EXTEN})   [pbx_config]
  '18884716070' =  1. Macro(dialpots|${EXTEN})   [pbx_config]
  '18886684636' =  1. Macro(dialpots|${EXTEN})   [pbx_config]

But when I dial a number in the toll-free-override context (i.e.
18664277451) it still gets processed by the enumdial macro.  I thought
that an exact match would take precedence over a _ match.  What am I
missing?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] included context not being prioritized properly

2008-06-25 Thread Brian J. Murrell
On Wed, 2008-06-25 at 11:25 -0500, Tilghman Lesher wrote:
 That's only true within the same context.  ONLY if a match is not found in the
 current context will it go into an included context.

Ahhh.  Well, then that explains it.  Any thoughts on how to achieve my
goal, without having to encode all of what would be in the override
context in the outbound-ld context?

b.




signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] Please Advice on Best High traffic fxo gateway/cards

2008-06-15 Thread Brian J. Murrell
On Sun, 2008-06-15 at 17:43 +0300, James Mutuku wrote:
 Please advice on  channel bank

Dude.  There's the cool new website you should check out.  It's
www.google.com.

Seriously.  This list is not full of people waiting to do the simplest
research at your request.  Spend a few minutes and do some self-help
before coming here asking the simplest, most general questions.  You are
more likely to get answers to interesting questions rather than
mundane-google-would-have-told-you-all-you-need-to-know-in-5-minutes
questions.

b/



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Please Advice on Best High traffic fxo gateway/cards

2008-06-15 Thread Brian J. Murrell
On Sun, 2008-06-15 at 11:03 -0400, Steve Totaro wrote:
 On Sun, Jun 15, 2008 at 10:53 AM, Brian J. Murrell
 [EMAIL PROTECTED] wrote:
  On Sun, 2008-06-15 at 17:43 +0300, James Mutuku wrote:
  Please advice on  channel bank
 
  Dude.  There's the cool new website you should check out.  It's
  www.google.com.
 
  Seriously.  This list is not full of people waiting to do the simplest
  research at your request.  Spend a few minutes and do some self-help
  before coming here asking the simplest, most general questions.  You are
  more likely to get answers to interesting questions rather than
  mundane-google-would-have-told-you-all-you-need-to-know-in-5-minutes
  questions.
 
  b/
 
 While true to some degree, I assumed he was looking for someone to
 recommend a certain product based on good experiences in the Asterisk
 World.

See, I saw the quotes around channel bank more as the follow question
what is a channel bank.  Maybe it's a language thing and perhaps the
OP can take as constructive criticism to be more to one's actual point
when asking a question.

If he really did understand what a channel bank is and was looking for
recommendations, something more direct like Any recommendations on
which channel bank(s) I should consider using? would have been much
more fruitful I suspect.

 Google may be good for getting information but will turn up a good
 many ads too.  Most of these ads/sites all claim to be the best.  We
 are the leaders of (such and such)

Sure, but all of them will give him a good idea of what one actually is,
which is really what I suspect the question was.

 An obvious pitfall I met was Citel gateways.  Maybe they have improved
 for the Definity line, but going that route a year and a half ago made
 me look very bad.  I wish I had asked on the list and got someone with
 some experience to say, think twice.

Agreed.  I wholeheartedly agree with soliciting for and giving product
recommendations and experiences, but questions like what is ... most
likely can almost always be answered from google with a little effort on
one's own behalf.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-users] SIP call, updated with CID as it becomes available

2008-06-11 Thread Brian J. Murrell
Right now I have an Asterisk 1.4.18ish server and a Wildcard POTS
interface.  As it is now, when the zap line gets a call, Asterisk
answers it and waits for the analog CID to be presented, then rings the
SIP phones with the call and the CID.  There's a significant latency
involved in doing this.

I'm wondering if the SIP lines can start ringing as soon as the zap line
gets a call and when the zap line finally gets the CID, that is passed
down to the already ringing SIP phones.

That way if a SIP phone user wants to wait for the CID, they can, but if
they just want to answer the phone without waiting for the CID, they can
do that too.

One might suggest that everyone wants to see the CID anyway, so why
bother?  Because in some situations, the phone is not at an arms reach
and the person only starts making their way towards it when they start
to hear the ringing, so if the ringing starts before the CID is
available it is likely that by the time they have gotten to the phone,
the CID is available and yet the latency between the availability of the
call on the zap line and it being picked up at a ringing phone has been
reduced a ring or two.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] decrease the time it takes for asterisk (fxsks) to answer

2008-06-11 Thread Brian J. Murrell
On Wed, 2008-06-11 at 10:12 -0400, Steve Totaro wrote:
 Do you actually have callerID on your line?  That takes about two
 seconds.  Try removing it and see how much faster Asterisk answers.
 
 That brings up a question though, on a regular landline with caller ID
 the phone rings right away, it just doesn't display caller ID info
 until a couple of rings.  Why not have that option in Asterisk?

You mean like I asked in my question SIP call, updated with CID as it
becomes available just an hour ago?  :-)

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] decrease the time it takes for asterisk (fxsks) to answer

2008-06-11 Thread Brian J. Murrell
On Wed, 2008-06-11 at 10:38 -0400, Steve Totaro wrote:
 
 Exactly!  It is funny how when idea or technology is ready, many
 people have the same thougts at the same time.

Indeed.  But what is even more interesting is that this technology is
not just ready.  It's been ready for a long time and indeed I have had
this thought in my mind for many months now.  I have only just now
chosen to express it.  Why now, along with somebody else, within an hour
of each other?  Very strange.

 There should be a
 study about that concept.

Heh.  I wonder if I can get a grant.  :-)

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] SIP call, updated with CID as it becomes available

2008-06-11 Thread Brian J. Murrell
On Wed, 2008-06-11 at 15:57 +0100, Gordon Henderson wrote:
 
 Intersting idea... However, I live in a country where on a regular 
 landline with caller ID, the caller ID is displayed before the phone 
 rings, so make sure it's an option and not hard-wired...

Well, I think your situation makes the issue moot as the (SIP) message
which initiates the ring of your (SIP) phone will already have the CID
in it.

The issue is being able to answer a ringing zap line and immediately
progress through the dialplan so that a corresponding Dial() can be
executed, but *somehow* updating the (SIP) transaction to the Dial()ed
phone(s) that are already ringing to add the CID.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] SIP call, updated with CID as it becomes available

2008-06-11 Thread Brian J. Murrell
On Wed, 2008-06-11 at 13:30 -0500, Brent Davidson wrote:
 On the subject of CallerID and ringing, I'm not sure if it's like this
 everywhere in the US, but where I live in Texas, our caller ID signal
 is sent between the first and second rings.

It's like that here in Canada too.

 If the phone is answered in the middle of the first ring then CID
 signal is never received.  This might not be an issue in the scenario
 being discussed, because it sounds more like you're asking for
 Asterisk to connect the ringing Zap channel to a sip line before
 issuing an answer in the dialplan.

Yeah.  I had never thought it through that fully but indeed, that would
be what I'm talking about.  I guess it never occurred to me that way
because I don't usually Answer() in my dialplan contexts anyway.  I
don't think I've every really understood why I need to given that it all
seems to work without doing that.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] SIP call, updated with CID as it becomes available

2008-06-11 Thread Brian J. Murrell
On Wed, 2008-06-11 at 14:51 -0400, Steve Totaro wrote:
 
 If you ever have problems with a call dropping after 30 seconds,
 Answer() is usually the cause.

Interesting.  I can't say that I've ever had that problem.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Manual Wardialer

2008-05-24 Thread Brian J. Murrell
On Sat, 2008-04-26 at 18:41 -0400, Andreas van dem Helge wrote:
 Does anyone have a script for manual wardialer for asterisk? not sure
  if wardialer is the correct term but basically I want to call X
  number say 555- through 555-0050 and be able to listen to each
  call and when I hang up or press a key it will dial the next number
  for me. I guess sort of like scanning an exchange but I want to be
  on the line and if possible complete / talk on certain calls.

Hrm.  I wonder what you could possibly want that for?  Do you mind if
include my area code and exchange in your script as an exception to your
scanning?  Anyone else care to be on that exception list?  Actually,
it might be more efficient for me to ask who cares to be on the list to
be scanned.  Anyone?  Anyone at all?  ;-)

b.



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

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


Re: [asterisk-users] upgrade of asterisk .... to what?

2008-05-22 Thread Brian J. Murrell
On Thu, 2008-05-22 at 14:05 +0200, nik600 wrote:
 
 No, i'm just wondering because there is creating a greater difference
 between my installation and the actual Asterisk.

If it ain't broke, don't fix it.  You are already so far behind that any
upgrade is going to be a major task of testing and verification on your
part, so why not just wait until you have an actual reason to upgrade.

As long as it's being supported and does it's job for you, I'd just stay
right where you are.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Googles 411 services

2008-05-19 Thread Brian J. Murrell
On Mon, 2008-05-19 at 11:13 +0100, Adrian Marsh wrote:
 Hi Brian,
 
 Thanks for the reply.  I tried searching for your posts, but no luck.

I find effective use of the Internet absolutely depends on knowing how
to search for stuff.

http://www.google.ca/search?q=site%3Alists.digium.com+murrellie=utf-8oe=utf-8aq=trls=com.ubuntu:en-US:unofficialclient=firefox-a

Top result is the thread I was referring to.  Follow that thread for a
few messages and you will find my posting about my enum handler which
itself has a section in it showing my enum handling macro.

 Do you have sample code I could see?

In the link pointed to in the message.

 Or do you just take a +101 result
 and move to the next in the list??

My enum macro does all of failover to the various enum results simply
based on the result code of the Dial() application.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] Googles 411 services

2008-05-17 Thread Brian J. Murrell
On Sat, 2008-05-17 at 18:38 +0100, Adrian Marsh wrote:
 All,
  
 Does anyone know of a SIP URI direct to googles  800-GOOG-411 service?

Yeah, I suppose a direct SIP connection would be nice.
 

 An enum lookup shows 3 URIs listed, none of them seem to be google
 directly,

No, they are SIP-PSTN termination services.  I use them via an ENUM
lookup for all of my toll-free calling since my ITSP doesn't terminate
toll-free for me at no charge.

 and I think 1 of them fails 100%, and the remaining one fails at other
 random times.

Yeah, they do have a random failure rate, which is why my enum macro
returns all three and rolls over to alternate values if any fail.  Check
the archives (within the last few weeks) for more details.

b,




signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

[asterisk-users] caller-id on X100P fails frequently

2008-05-15 Thread Brian J. Murrell
I have a Wildcard FXO: Wildcard X100P (clone) in my Asterisk (1.4.17)
machine and as of late, Caller-ID on it seems to be failing more
frequently than not.  Sometimes I get callerid.c:613 callerid_feed:
Caller*ID failed checksum sometimes it fails without even that.

In Zapata.conf I have:

usecallerid=yes
cidsignalling=bell
cidstart=ring

I'm in Bell Canada land if that makes any difference.

Any ideas on how to make it more reliable?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] better enumlookup handler

2008-05-09 Thread Brian J. Murrell
On Thu, 2008-05-08 at 10:51 -0500, Russell Bryant wrote:
 
 Have you taken a look at the ENUMQUERY() and ENUMRESULT() functions that are a
 part of Asterisk 1.6?
 
 The ENUMQUERY() function lets you do a single enum query

From a single zone it seems.  So that means a for zone in $ZONES type
of wrapper around ENUMQUERY/ENUMRESULT which means they have the same
limitation that my implementation currently has which is that you get a
(I'm assuming) priority ordered set of results for each zone rather than
a priority ordered list taken and sorted from all zones.

 for a number.  Then,
 the ENUMRESULT() function lets you access and iterate through all of the 
 records
 received from the query.

What does ENUMRESULT return?  A single URI suitable for use in a Dial
command?  Are the results in ENUMRESULT() ordered per the NAPTR
ordering/priority specification?  i.e. so item 1 has the highest NAPTR
priority and n-1 the lowest?


 svn co http://svncommunity.digium.com/svn/russell/asterisk-1.4/

It applies cleanly to 1.4.17, so that is awesome.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] better enumlookup handler

2008-05-08 Thread Brian J. Murrell
To this end, I have taken a first pass at a Perl AGI script to look up
and return a list of URIs for a given phone number.  I will not pretend
that I have read the relevant RFCs but have implemented based on the
knowledge I have gathered about ENUM lookups from various sources.

Given my dialplan macro (included as a comment in the AGI script) it
seems to work here, including rolling over (in order of preference) to
alternate URIs if there is a failure to make a connection on any
previous URIs.

The code can be found at http://brian.interlinx.bc.ca/enumlookup.agi

Constructive criticism appreciated.

About the only TODO I can think of right now is to sort by preference of
the records gathered from all of the domains searched rather than
sorting by order of preference within each domain.

Additionally, I could use the search value in
the /etc/asterisk/enum.conf file rather than hard coding them into the
AGI script I suppose.

Cheers,
b.
 


signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] better enumlookup handler

2008-05-08 Thread Brian J. Murrell
On Thu, 2008-05-08 at 10:51 -0500, Russell Bryant wrote:
 
 Have you taken a look at the ENUMQUERY() and ENUMRESULT() functions that are a
 part of Asterisk 1.6?

I have not even entertained thinking of 1.6 yet.  :-/

 The ENUMQUERY() function lets you do a single enum query for a number.  Then,
 the ENUMRESULT() function lets you access and iterate through all of the 
 records
 received from the query.  Then, you can use dialplan logic to try each one
 without having to actually do the lookup over and over ...

Dude!  Where were you yesterday, before I spent a few hours last night
writing my AGI?  :-)

 I have an unsupported 1.4 backport of these functions available.
 
 svn co http://svncommunity.digium.com/svn/russell/asterisk-1.4/

Now that's what I want to hear.  Back port.  Woohoo!  I wonder how hard
a backport from your 1.4 to my 1.4.17 will be.  I might just have to
take a whack at it.  :-)

Thanx Russell!

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] better enumlookup handler

2008-05-07 Thread Brian J. Murrell
On Wed, 2008-05-07 at 14:26 +0200, Johansson Olle E wrote:
 
 Quoting RFC 3824:
 
 Only one SIP URI, ideally, appears in an ENUM record set for a
telephone number.  While it may initially seem attractive to
provide multiple SIP URIs that reach the same user within ENUM,  
 if
there are multiple addresses at which a user can be contacted,
considerably greater flexibility is afforded if multiple URIs are
managed by a SIP location service that is identified by a single
record in ENUM.

There are several problems with that.  In my use case, it's toll-free
handling by separate SIP providers being enumerated (generically -- i.e.
they return NAPTRs for any 18{00,66,88,etc.}* numbers) for all providers
registered to handle toll-free) by e164.org.  I'm not sure how feasible
it is to return a single SIP location service (I take that to mean a SRV
record) in that situation given that different providers have different
formats.  See from my previous e-mail, that for a given number, say,
18668823998 the following two SIP urls can be used:

sip:[EMAIL PROTECTED] .
sip:[EMAIL PROTECTED] .

I fail to see how something like that could be coded into a single
location service record.

Additionally, I'm not even sure multiple SRV records would be any
better.  Where is the handling of the fact that there is(/are multiple)
SRV records for a given SIP address done and how does rollover happen
when one of them returns CONGESTION, say?

   Behavior for parallel and sequential forking in
SIP, for example, is better managed in SIP than in a set of ENUM
records.

Does this imply that if there are multiple SRV records for a resource,
say:

$ORIGIN mydomain.com
_sip._udp 3600 IN SRV 10 0 5060 asterisk1
_sip._udp 3600 IN SRV 10 0 5060 asterisk2

that Dial(SIP/[EMAIL PROTECTED]) will in fact iterate over the SRV
records in the case of connection failure of one of them?

If so, I'm not sure how/if e164.org can translate their generic
toll-free NAPTR mapping into a working SRV service instead.

 We look forward to source code improvements!

I didn't really intend to bash ENUMLOOKUP() but was simply looking for
something more robust.  I am sure for the case of single NAPTR records,
ENUMLOOKUP() is just fine.  Sure I would like it more robust, but other
solutions exist so I'm willing to exercise them.

Well my understanding is that the enumlookup AGI script that I'm looking
for does what I want (and would like ENUMLOOKUP() to do) and that's
return all of the values from a single lookup (i.e. in an array or list)
rather than calling ENUMLOOKUP() iteratively for however many objects
exist.

Even the existing single record/iterative behaviour of ENUMLOOKUP()
would not be so bad if it kept state for each caller and actually did
return the successive records found from a single lookup rather than
doing a new lookup every time, possibly getting records in a different
order than it did last time (which of course results in handing back the
same record it did last time even though the record number counter has
been incremented).

Cheers,
b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] better enumlookup handler

2008-05-07 Thread Brian J. Murrell
On Wed, 2008-05-07 at 08:21 -0400, Matt Watson wrote:
 There is a enumlookup.agi that is included with FreePBX and thus trixbox, PBX 
 in a flash, etc. etc.

Yeah, I had gotten that impression somewhere too.

 If you have trouble finding it let me know and I can send you it.

If you would be so kind, I will take you up on this offer.  Saves me
from having to download the whole FreePBX/trixbox, etc. just to get the
one script.  I wonder if the asterisk project would consider hosting
that script as a contrib in the distribution.

 I can;t really vouch for its quality,

I guess a code audit will tell.  :-)  Although I got an impression that
it was written in PHP.  I'm not much of a fan of PHP.  Don't really see
the point for something so simple.  Bash, Perl (without the overhead of
PHP) or even an executable-from-C seems more appropriate for something
as relatively simple.

Maybe I should also take up Johansson's suggestion and fix
ENUMLOOKUP.  :-)

 but I do use it and it does work... but i;m not sure how well it handles 
 multiple results.

I will test/audit for that specifically.

Thanx!
b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] better enumlookup handler

2008-05-07 Thread Brian J. Murrell
On Wed, 2008-05-07 at 22:54 +0300, Tzafrir Cohen wrote:
 Slightly off-topic:

Yeah.

 On Wed, May 07, 2008 at 10:29:47AM -0400, Brian J. Murrell wrote:
 
  I guess a code audit will tell.  :-)  Although I got an impression that
  it was written in PHP.  I'm not much of a fan of PHP.  Don't really see
  the point for something so simple.  Bash, Perl (without the overhead of
  PHP) or even an executable-from-C seems more appropriate for something
  as relatively simple.
 
 Shell scripts are often very inefficient with respect to execution time.

Indeed.

 They often use subprocesses and other programs for relatively simple
 tasks.

Agreed.

 While running a simple bash (or better: dash) is faster than
 running perl or php, running a modestly complex shell script is often
 slower than running the same thing with perl.

Right.  Execve() and library loading and so forth.  Understood
completely.

All of that is why I did mention executable-from-C though.  :-)

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] better enumlookup handler

2008-05-07 Thread Brian J. Murrell
On Wed, 2008-05-07 at 13:40 -0700, John Todd wrote:
 
 1) The ENUMLOOKUP function is currently being fixed for TRUNK. 

Ahhh.  Sweet.  I wonder how difficult a backport will be.

 Take a look at http://bugs.digium.com/view.php?id=8089 for the 
 current status.  Testing would be appreciated.

Will do.  I'm afraid I don't have any way to test TRUNK however.  I only
have my production system and taking the phone offline just does not fly
here.  :-(

 2) I will generate a dialplan subroutine that will hand back an array 
 of SIP URIs for a given number, and I'll post it here and on the 
 voip-info.org wiki - that's pretty easy.

Cool.  But one need not be limited to SIP of course.  IAX2, and even
others depending on what one might want to allow their users to do.
i.e. a mailto could even be used to send a mail with a voice attachment.

 I agree that one query 
 should result in a static and ordered set of URIs for that particular 
 attempt cycle.

Great.

 3) Your last comment about keeping state is difficult to square 
 with the intent of NAPTR lookups.  The point is to have dynamic NAPTR 
 replies in case the distant system wishes to change the inbound 
 behavior towards their systems, so caching that data is almost always 
 a Bad Idea for more than a few seconds.

Ahhh.  Yes.  I failed to explain that part correctly.  I only meant
caching the data long enough to iterate through a list of ENUMLOOKUP()s
as a single transaction.  Clearly returning an array makes more sense.
I was just trying to make a suggestion that would appease a desire to
not disturb the API of ENUMLOOKUP().

 Creating an array of results 
 and then having that variable follow the caller through a very short 
 timeframe of cascading attempts makes sense to avoid re-ordering 
 confusion, but I would say that a completely new lookup to the DNS 
 should happen after the interval described by the last-attempted set 
 of responses.  In other words, if we get back three SIP URIs from the 
 NAPTR lookup, then try each in turn until they all fail.

Agreed.

 Each 
 failure (depending on how your SIP timers are set) may take 20 
 seconds.  Therefore, for that particular user session, don't do 
 another DNS query for 60 seconds, which is how long it takes all 
 three current URIs time out.

Right.  I still like an array of all URIs returned from one lookup
better though.

 4) SRV records are an entirely different story, and unrelated to 
 NAPTR queries, even though it seems they are very similar.

Yeah, I think the spirit was there in suggesting SRV records, but the
technicalities of this use case make it impossible to use SRV records.

 5) AGI scripts for DNS lookups: This makes me feel like I need a shower.

Agreed.  But it's the shortest distance between point A and B for a
price.  In my installation I'm willing to pay it.  Other installations
might not.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] IAX issues with 1.4.19.1

2008-05-06 Thread Brian J. Murrell
On Mon, 2008-05-05 at 16:36 -1000, Julian Yap wrote:
 That was a bug in the release.
 
 From the 1.4.20-rc1 Changelog:
 2008-04-30 16:30 + [r114891]  Russell Bryant [EMAIL PROTECTED]

So basically, r114891 was a fix to AST-2008-006?  So if you applied the
patch for AST-2008-006 you now really need this new fix (r114891) to
regain the stability that chan_iax2.c had before the AST-2008-006 patch?

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] IAX issues with 1.4.19.1

2008-05-06 Thread Brian J. Murrell
On Tue, 2008-05-06 at 13:23 +0100, Julian Lyndon-Smith wrote:
 Yes.

Hrm.  For those of us that are following along the AST-* train, patching
as per the AST-* release notices, as a matter of process, wouldn't it
have been good to republish AST-2008-006 and include this fix along with
the original patch?

IOW, IMHO, it should be standard practice that when you release a fix to
a patch in an AST-* security release, that you re-publish the security
notice complete with the original security fix and the security fix fix.

Some of us don't have the bandwidth to keep upgrading to
release-of-the-week or to watch every commit looking for both the
security fixes and the fixes to the security fixes.

Your consideration of this process enhancement would be greatly
appreciated.

Thanx,
b.

/me goes off to patch his * once again.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] IAX issues with 1.4.19.1

2008-05-06 Thread Brian J. Murrell
On Tue, 2008-05-06 at 08:42 -0500, Tilghman Lesher wrote:
 
 It's not actually a fix to the security fix.

No, indeed.

 The security fix simply
 highlighted an issue which was already present in Asterisk.

That may be true, but the security fix now depends on that new fix, so
it's tangentially related at least.

 You would
 have seen this same issue prior to the security fix simply by running
 'iax2 show channels', as that command runs through every single slot
 in the channel array, looking for active channels.  The security issue
 fix simply made that slow search process (already there, nothing new)
 painfully obvious.

Right.  Which to me at least, tightly couples it.  IOW, the security
fix, while yes, it fixes the security problem, is quite useless without
this other fix as it makes iax2 unstable.

b.



signature.asc
Description: This is a digitally signed message part
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

  1   2   >