Re: [asterisk-users] how to read sip debug

2016-07-05 Thread Thufir
This is interesting:

"Note that the To and From header fields are not reversed in the response
message as one might expect them to be. This is because the To and From
header fields in SIP are defined to indicate the direction of the request,
not the direction of the message. "  -Cisco

so, when I'm receiving an inbound call, the direction would be telnyx
first, then me.  Regardless of whether the ?message? is from me or the
provider.


-Thufir
-- 
_
-- 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] how to read sip debug

2016-07-05 Thread Thufir
Generally, what am I looking for when turning SIP debug on?  More
specifically, the provider says that I'm returning a 404 when they try to
call me.  Now, I had inbound working, literally, the other day.  Outbound
works fine.  I "may" have broken it either through Asterisk config or the
providers portal with settings.  Ok, I broke it -- not sure how.

comments interspersed:

mordor*CLI>
Reliably Transmitting (NAT) to 192.76.120.10:5060:

I think/infer/assume that this is the IP address for telnyx SIP servers

OPTIONS sip:sip.telnyx.com SIP/2.0

What does OPTIONS mean?

Via: SIP/2.0/UDP :5060;branch=z9hG4bK28142189;rport

rport relates to NAT?  The message is via SIP UPD from my externip 
what is branch?

Max-Forwards: 70

70 hops max?

From: "asterisk" ;tag=as1a7aca46

from my externip, with a hash to keep the calls straight?

To: 

easy, to telnyx

Contact: 

from me

Call-ID: 6fce72627f253b7f2e15dac713b52392@:5060

another hashcode, Call-ID ?

CSeq: 102 OPTIONS

?

User-Agent: Asterisk PBX 13.1.0~dfsg-1.1ubuntu3

easy enough, my system

Date: Wed, 06 Jul 2016 02:17:12 GMT

easy, date

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE

enumerating accepted replies?

Supported: replaces

?

Content-Length: 0

no data, just "hi"


---
mordor*CLI>


If I see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions in
a SIP trace, that's relatively clear.  But what am I looking for with
regards to receiving calls?


thanks,


Thufir
-- 
_
-- 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] Function SHELL not registered

2016-07-05 Thread Eric Wieling
Maybe Asterisk dialplan apps and functions don't work in the [globals] 
section.


On 07/05/2016 11:40 AM, John Kiniston wrote:
If you just need the name of the system it may be contained in the 
variable ${SYSTEMNAME}.


This is assuming you have the systemname set in asterisk.conf

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Main+Configuration+File

That said, for SHELL support you probably need to set :

live_dangerously = yes

Also in your asterisk.conf

https://wiki.asterisk.org/wiki/display/AST/Privilege+Escalations+with+Dialplan+Functions


On Tue, Jul 5, 2016 at 7:27 AM, Michael Jepson > wrote:


Even weirder, when I check in asterisk, using "core show
functions", I can see the function SHELL right there.
From what I can find, the call is made from a conf. file, as grep
shows:

globals.conf: G_server=${SHELL(hostname)}

Is this even correct? The config files are from a much older
version of asterisk, which I am trying to update.

-Original Message-
From: asterisk-users-boun...@lists.digium.com

[mailto:asterisk-users-boun...@lists.digium.com
] On Behalf Of
Michael Jepson
Sent: dinsdag 5 juli 2016 16:07
To: Asterisk Users Mailing List - Non-Commercial Discussion
>
Subject: Re: [asterisk-users] Function SHELL not registered

I have rebuilt a new version, making sure func_shell was selected,
but I am still getting this error.

-Original Message-
From: asterisk-users-boun...@lists.digium.com

[mailto:asterisk-users-boun...@lists.digium.com
] On Behalf Of A J
Stiles
Sent: maandag 4 juli 2016 09:34
To: Asterisk Users Mailing List - Non-Commercial Discussion
>
Subject: Re: [asterisk-users] Function SHELL not registered

On Monday 04 Jul 2016, Michael Jepson wrote:
> Hi all,
>
> I am getting the following error when starting asterisk:
> pbx_functions.c: Function SHELL not registered
>
> Some of my conf files use a SHELL command, which used to work
with an
> older version of asterisk, but now with version 13.9.1 I see this
> warning in the error log. How can I register the SHELL function?
From
> what I can find in the wiki's, it should just be available?
>
> Best regards,
>
> Michael Jepson

Did you include func_shell in your Asterisk build?

Fortunately, it's no biggie to build a missing module, because the
"make"
command explicitly keeps track of everything it has already done
and does not need to do again.  Just cd into the folder with your
Asterisk source, run `make menuselect` and select "func_shell" 
(under dialplan functions).  Then run `make` and finally `make

install`.

--
AJS

Note:  Originating address only accepts e-mail from list!  If
replying off- list, change address to asterisk1list at earthshod
dot co dot uk .

--
_
-- 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

--
_
-- 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

--
_
-- 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




--
A human being should be able to change a diaper, plan an invasion, 
butcher a hog, conn a ship, design a building, write a sonnet, balance 
accounts, build a wall, set a bone, comfort the dying, take orders, 
give orders, cooperate, act alone, solve equations, analyze a new 
problem, pitch manure, program a computer, cook a tasty meal, fight 
efficiently, die gallantly. Specialization is for insects.

---Heinlein




--
if at first you don't 

[asterisk-users] OpenSIPS or Kamailio based fronting for Asterisk?

2016-07-05 Thread Tickling Contest
Hello,

I am beginning to front my Asterisk cluster with OpenSIPS/Kamailio and so
far my biggest issue is the complete lack of quick-start-like documentation
for either. Is there any place I can get a very simple HA configuration
(telling me where the config files are, for starters, is a good thing) for
OpenSIPS or Kamailio with the following features:

(a) Support an arbitrarily large number of Asterisk servers (say, upto 10).
(b) Offload SIP registration to a realtime/mysql DB used by the PBXs.

Please also let me know if I should have to change my Asterisk PBX config
in any way for this to happen.

Thanks!
-- 
_
-- 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] Function SHELL not registered

2016-07-05 Thread John Kiniston
If you just need the name of the system it may be contained in the variable
${SYSTEMNAME}.

This is assuming you have the systemname set in asterisk.conf

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Main+Configuration+File

That said, for SHELL support you probably need to set :

live_dangerously = yes

Also in your asterisk.conf

https://wiki.asterisk.org/wiki/display/AST/Privilege+Escalations+with+Dialplan+Functions


On Tue, Jul 5, 2016 at 7:27 AM, Michael Jepson  wrote:

> Even weirder, when I check in asterisk, using "core show functions", I can
> see the function SHELL right there.
> From what I can find, the call is made from a conf. file, as grep shows:
>
> globals.conf: G_server=${SHELL(hostname)}
>
> Is this even correct? The config files are from a much older version of
> asterisk, which I am trying to update.
>
> -Original Message-
> From: asterisk-users-boun...@lists.digium.com [mailto:
> asterisk-users-boun...@lists.digium.com] On Behalf Of Michael Jepson
> Sent: dinsdag 5 juli 2016 16:07
> To: Asterisk Users Mailing List - Non-Commercial Discussion <
> asterisk-users@lists.digium.com>
> Subject: Re: [asterisk-users] Function SHELL not registered
>
> I have rebuilt a new version, making sure func_shell was selected, but I
> am still getting this error.
>
> -Original Message-
> From: asterisk-users-boun...@lists.digium.com [mailto:
> asterisk-users-boun...@lists.digium.com] On Behalf Of A J Stiles
> Sent: maandag 4 juli 2016 09:34
> To: Asterisk Users Mailing List - Non-Commercial Discussion <
> asterisk-users@lists.digium.com>
> Subject: Re: [asterisk-users] Function SHELL not registered
>
> On Monday 04 Jul 2016, Michael Jepson wrote:
> > Hi all,
> >
> > I am getting the following error when starting asterisk:
> > pbx_functions.c: Function SHELL not registered
> >
> > Some of my conf files use a SHELL command, which used to work with an
> > older version of asterisk, but now with version 13.9.1 I see this
> > warning in the error log. How can I register the SHELL function? From
> > what I can find in the wiki's, it should just be available?
> >
> > Best regards,
> >
> > Michael Jepson
>
> Did you include func_shell in your Asterisk build?
>
> Fortunately, it's no biggie to build a missing module, because the "make"
> command explicitly keeps track of everything it has already done and does
> not need to do again.  Just cd into the folder with your Asterisk source,
> run `make menuselect` and select "func_shell"  (under dialplan functions).
> Then run `make` and finally `make install`.
>
> --
> AJS
>
> Note:  Originating address only accepts e-mail from list!  If replying
> off- list, change address to asterisk1list at earthshod dot co dot uk .
>
> --
> _
> -- 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
>
> --
> _
> -- 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
>
> --
> _
> -- 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
>



-- 
A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts,
build a wall, set a bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
---Heinlein
-- 
_
-- 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] Function SHELL not registered

2016-07-05 Thread Michael Jepson
Even weirder, when I check in asterisk, using "core show functions", I can see 
the function SHELL right there.
>From what I can find, the call is made from a conf. file, as grep shows:

globals.conf: G_server=${SHELL(hostname)}

Is this even correct? The config files are from a much older version of 
asterisk, which I am trying to update.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Michael Jepson
Sent: dinsdag 5 juli 2016 16:07
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Function SHELL not registered

I have rebuilt a new version, making sure func_shell was selected, but I am 
still getting this error.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of A J Stiles
Sent: maandag 4 juli 2016 09:34
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Function SHELL not registered

On Monday 04 Jul 2016, Michael Jepson wrote:
> Hi all,
> 
> I am getting the following error when starting asterisk:
> pbx_functions.c: Function SHELL not registered
> 
> Some of my conf files use a SHELL command, which used to work with an 
> older version of asterisk, but now with version 13.9.1 I see this 
> warning in the error log. How can I register the SHELL function? From 
> what I can find in the wiki's, it should just be available?
> 
> Best regards,
> 
> Michael Jepson

Did you include func_shell in your Asterisk build?

Fortunately, it's no biggie to build a missing module, because the "make" 
command explicitly keeps track of everything it has already done and does not 
need to do again.  Just cd into the folder with your Asterisk source, run `make 
menuselect` and select "func_shell"  (under dialplan functions).  Then run 
`make` and finally `make install`.  

--
AJS

Note:  Originating address only accepts e-mail from list!  If replying off- 
list, change address to asterisk1list at earthshod dot co dot uk .

--
_
-- 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

--
_
-- 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

-- 
_
-- 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] Some SIP OPTIONS packages seem to be ignored by the peer

2016-07-05 Thread Michael Maier
Hello!

Sometimes, I can see here the following scene:

Asterisk sends 11 SIP OPTIONS-packages (qualify=120) and they are all
ignored by the peers - but the 12. package is answered immediately as
expected (I'm sure there is no network related problem).

I can see this on trunks via Internet and locally with extensions - no
matter if it is via pjsip or traditional sip module.

What's the difference between the 11 packages and the 12. package?
It's the branch, tag and Call-ID.
The 11 packages before all do have the same branch, tag and Call-ID. The
12. package changes them.

Looks like some of these values are ignored by the peers. But why? Are
they broken?



Thanks,
kind regards,
Michael

-- 
_
-- 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] CALLERID on pjsip doesn't work?

2016-07-05 Thread Andrew Ivins
Thanks Joshua. That did the trick.

On 4 July 2016 at 19:18, Joshua Colp  wrote:

> Andrew Ivins wrote:
>
>> On 1 July 2016 at 17:41, Joshua Colp > > wrote:
>>
>>
>> exten => 1234,Set(CALLERID(all)="Jon Doe" <+123456789>)
>> same => n,Dial(PJSIP/phone123, 30)
>>
>>
>> Your exten line has no priority, is that how it is in your dialplan?
>>
>>
>> Actually no, I stole that line from an earlier email to this list. Mine
>> has a priority.
>>
>> If not you can isolate things a bit further by trying the following:
>>
>> Set(CALLERID(all)=Jon Doe <+123456789>)
>>
>> Or individually:
>>
>> Set(CALLERID(name)=Jon Doe)
>> Set(CALLERID(num)=+123456789)
>>
>>
>> Tried many permutations of this, and the only thing I can get to happen
>> is to make the call present as Anonymous by changing the
>> pres-name/pres-num setting.
>>
>> It's not a production system, dialplan is pretty simple:
>>
>> same => _X.1,Set(CALLERID(name-pres)=allowed)
>> same => n,Set(CALLERID(num-pres)=allowed)
>> same => n,Set(CALLERID(name)=Fred)
>> same => n,Set(CALLERID(num)=6123)
>> same => n,Dial(PJSIP/DEADDEADBEEF, 30)
>> same => n,Hangup()
>>
>> DEADDEADBEEF is the name of the endpoint and the endpoint works. I use
>> MAC addresses and plan to dynamically map extensions to them later on
>> (kind of like user mode in freepbx).
>>
>> In the console, if I log the value of CALLERID, it is what I expect to
>> it to be.
>>
>>
> 
>
> You have from_user set which will override the user in the From header
> which is where callerid would be. You also don't have send_rpid or send_pai
> turned on so there would be no alternate way to send it. Try setting
> send_rpid or send_pai to yes and trying again.
>
>
> --
> Joshua Colp
> Digium, Inc. | Senior Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
> Check us out at: www.digium.com & www.asterisk.org
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>   http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
-- 
_
-- 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] Function SHELL not registered

2016-07-05 Thread Michael Jepson
I have rebuilt a new version, making sure func_shell was selected, but I am 
still getting this error.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of A J Stiles
Sent: maandag 4 juli 2016 09:34
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: Re: [asterisk-users] Function SHELL not registered

On Monday 04 Jul 2016, Michael Jepson wrote:
> Hi all,
> 
> I am getting the following error when starting asterisk:
> pbx_functions.c: Function SHELL not registered
> 
> Some of my conf files use a SHELL command, which used to work with an 
> older version of asterisk, but now with version 13.9.1 I see this 
> warning in the error log. How can I register the SHELL function? From 
> what I can find in the wiki's, it should just be available?
> 
> Best regards,
> 
> Michael Jepson

Did you include func_shell in your Asterisk build?

Fortunately, it's no biggie to build a missing module, because the "make" 
command explicitly keeps track of everything it has already done and does not 
need to do again.  Just cd into the folder with your Asterisk source, run `make 
menuselect` and select "func_shell"  (under dialplan functions).  Then run 
`make` and finally `make install`.  

--
AJS

Note:  Originating address only accepts e-mail from list!  If replying off- 
list, change address to asterisk1list at earthshod dot co dot uk .

--
_
-- 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

-- 
_
-- 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