Re: [asterisk-users] hints and server-side DND (do not disturb)

2012-04-17 Thread isrlgb
יעע
-Original Message-
From: Vieri 
Sender: asterisk-users-boun...@lists.digium.com
Date: Tue, 17 Apr 2012 23:27:10 
To: 
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion

Subject: [asterisk-users] hints and server-side DND (do not disturb)

Hi,

Currently I'm using hints to determine SIP presence. As I understand it, a SIP 
extension can be labeled as busy, ringing, etc, based on a channel status. So a 
channel MUST be present. If it isn't then the extension is considered to be 
"available".

If my statement is correct then is there a way to set the extesnion as "busy" 
even if there's no channel associated with this extension?
eg. when an extension sets server-side DND (Do Not Disturb), it actually sets a 
boolean value in astdb. Whenever asterisk tries to route a call to this 
extension, it first checks this value. Obviously, there's no way I can use 
hints in this scenario, or is there? Is it possible to somehow create a "dummy" 
channel whenever an extension sets "server-side DND" (custom context) and 
delete it whenever it unsets it?

Thanks,

Vieri


--
_
-- 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] hints and server-side DND (do not disturb)

2012-04-17 Thread Vieri
Hi,

Currently I'm using hints to determine SIP presence. As I understand it, a SIP 
extension can be labeled as busy, ringing, etc, based on a channel status. So a 
channel MUST be present. If it isn't then the extension is considered to be 
"available".

If my statement is correct then is there a way to set the extesnion as "busy" 
even if there's no channel associated with this extension?
eg. when an extension sets server-side DND (Do Not Disturb), it actually sets a 
boolean value in astdb. Whenever asterisk tries to route a call to this 
extension, it first checks this value. Obviously, there's no way I can use 
hints in this scenario, or is there? Is it possible to somehow create a "dummy" 
channel whenever an extension sets "server-side DND" (custom context) and 
delete it whenever it unsets it?

Thanks,

Vieri


--
_
-- 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] Incoming SIP call is rejected always.

2012-04-17 Thread Matthew Jordan

- Original Message -
> From: "Yaroslav Panych" 
> To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
> 
> Sent: Tuesday, April 17, 2012 6:56:17 PM
> Subject: Re: [asterisk-users] Incoming SIP call is rejected always.
> 
> 2012/4/18 Matthew  Jordan :
> > I imagine that this is the case, as ASTERISK-19601 noted that
> > when this situation occurs, the NOTICE message indicates that
> > there is a failure to match the extension, as opposed to a failure
> > to match an allowed domain.
> 
> Yes, it was hell to detect real error cause(I was forced to learn how
> to debug in KDevelop in less than four hours). Yes, it looks like
> ASTERISK-19601. But still I cannot understand why asterisk extracts
> wrong domain from request.
> > However, in your SIP configuration you have set
> > allowexternaldomains to no.
> Yes, it is intended.
> 
> > Without knowing the URI the INVITE request was addressed to, its
> > difficult to say what might be the actual cause of this.
> I first letter I have provided CLI log which contains full request
> packets(Authless and authed INVITE included).
> 
> Probably I do not understand how to configure Asterisk:
> I have one asterisk. It serves SIP domain example.com. This asterisk
> must be able to establish session with registered client of this
> account and also must be able to accept incoming sessions. No
> sessions
> with 3rd-party accounts on 3rd-party domains allowed to established.
> How I should setup this asterisk?

Well, I can't tell you how to configure your Asterisk server.  However,
I can tell you why Asterisk rejected the INVITE request.

The URI that the INVITE request was addressed to is
4001020@192.168.8.2:5060.  The domain portion of this URI is
192.168.8.2.  Hence, the allowed domains need to include that
particular IPv4 address.  Looking at the allowed domains you've
specified in sip.conf, we have:

domain=sop-korniychuk
domain=192.168.8.1
domain=192.168.8.1:5062

So, since the INVITE request does not match any of those three domains,
its rejected.

Note: I noticed that you have autodomain set to yes; I'm going to
assume that the IPv4 address 192.168.8.2 is not associated with the
server.

Matt

> --
> _
> -- 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] Incoming SIP call is rejected always.

2012-04-17 Thread Yaroslav Panych
2012/4/18 Matthew  Jordan :
> I imagine that this is the case, as ASTERISK-19601 noted that
> when this situation occurs, the NOTICE message indicates that
> there is a failure to match the extension, as opposed to a failure
> to match an allowed domain.

Yes, it was hell to detect real error cause(I was forced to learn how
to debug in KDevelop in less than four hours). Yes, it looks like
ASTERISK-19601. But still I cannot understand why asterisk extracts
wrong domain from request.
> However, in your SIP configuration you have set allowexternaldomains to no.
Yes, it is intended.

> Without knowing the URI the INVITE request was addressed to, its
> difficult to say what might be the actual cause of this.
I first letter I have provided CLI log which contains full request
packets(Authless and authed INVITE included).

Probably I do not understand how to configure Asterisk:
I have one asterisk. It serves SIP domain example.com. This asterisk
must be able to establish session with registered client of this
account and also must be able to accept incoming sessions. No sessions
with 3rd-party accounts on 3rd-party domains allowed to established.
How I should setup this asterisk?

--
_
-- 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] Incoming SIP call is rejected always.

2012-04-17 Thread Matthew Jordan
Without knowing the URI the INVITE request was addressed to, its
difficult to say what might be the actual cause of this.  However,
in your SIP configuration you have set allowexternaldomains to no.
That implies that if the domain of the URI does not match any
of the allowed domains you have set, that the INVITE request will
be rejected.

I imagine that this is the case, as ASTERISK-19601 noted that
when this situation occurs, the NOTICE message indicates that
there is a failure to match the extension, as opposed to a failure
to match an allowed domain.

Matthew Jordan
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

- Original Message -
> From: "Yaroslav Panych" 
> To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
> 
> Sent: Tuesday, April 17, 2012 4:58:14 PM
> Subject: Re: [asterisk-users] Incoming SIP call is rejected always.
> 
> 2012/4/17 Danny Nicholas :
> > Maybe it needs to be _4001020?
> >
> 
> Not, it doesn't. Actually I have traced this incoming call step by
> step. Real reason it refuses - wrong domain. But why it wrong - have
> not any idea.
> 
> --
> _
> -- 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] Asterisk 1.8.11.0 Debian Squeeze packages with T.38 gateway, queue hints and fixed RFC4235 (notifycid=yes)

2012-04-17 Thread Kevin P. Fleming

On 04/17/2012 06:17 AM, Larry Moore wrote:

The send log you have posted does not show any outgoing T.38 packets
from your system.

I set up a test build of 1.8.11.0 using the patch recently released, I
have difficulties sending T.38 with this patch, in fact I cannot send
successfully however I can receive. I did however observe some outgoing
T.38 packets. The analogue fax modem I was dialling into is under my
control hence the log files showed there was no signalling coming from
my ITSP,

The T.38 session on my Asterisk server show the CRP's which were sent
from the analogue fax device during the negotiation.

The patch I have used for a while seems to give me outgoing
functionality as well as incoming.

I can't reproduce your scenario whereby your T.38 session is
communicating with a different gateway to the SIP server you use hence
can only speculate that Asterisk has difficulty wanting to send T.38 SDP
traffic when it is a different device than the SIP server it negotiates
with.


We know for a fact that Asterisk has no trouble with the signaling and 
media going to different addresses/ports. Honestly, I just don't 
understand why all of this effort is being put into trying to use an old 
(and clearly broken) patch for adding T.38 gateway support to Asterisk 1.8.


You guys know that it works in Asterisk 10, but you say you can't use 
Asterisk 10 for some reason that I don't understand.


--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kflem...@digium.com | SIP: kpflem...@digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
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


[asterisk-users] Asterisk 1.8.10 getaddrinfo

2012-04-17 Thread motty.cruz
Hello All, 
I'm gettint this error, started recently when I upgraded to 1.8.10 from
1.8.4. 

[Apr 17 08:03:52] ERROR[9099]: netsock2.c:263 ast_sockaddr_resolve:
getaddrinfo("external   out", "(null)", ...): Name or service not known
[Apr 17 08:03:52] WARNING[9099]: chan_sip.c:26503 sip_request_call: Unable
to find IP address for host externalout. We will not use this remote IP
address

Does anybody have an idea how to fix error above? 

Thanks, 
motty


--
_
-- 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] Incoming SIP call is rejected always.

2012-04-17 Thread Yaroslav Panych
2012/4/17 Danny Nicholas :
> Maybe it needs to be _4001020?
>

Not, it doesn't. Actually I have traced this incoming call step by
step. Real reason it refuses - wrong domain. But why it wrong - have
not any idea.

--
_
-- 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] Custom Application recording problem

2012-04-17 Thread Dale Noll

Billy,

I really should have had my coffee before answering you previous 
message.  My head was in the wrong place (not saying where) and I sent 
you down the wrong path.


Macro() is not the answer because of the WaitExten().  When WaitExten is 
used in a Macro(), it does not match within the macro, it matches an 
extension within the context where the macro was called.  This is what 
is causing your errors.


What you really should do is use gosub(), not macro().

Here is the recording routine

[sub-timo]
exten => s,1,Set(RecordingType=${ARG1})
exten => s,n,Set(TIMEOUT(digit)=2) ; Set Digit Timeout to 5 
seconds
exten => s,n,Set(TIMEOUT(response)=2) ; Set Response Timeout to 
10 seconds

exten => s,n,Answer
exten => s,n,NoOp(${CALLERID(num)})
exten => s,n,Set(number=${CALLERID(num)})
exten => s,n,NoOp(${number})
exten => s,n(recordmsg),Background(recmsg1)   ;"Please say yo message 
after the beep and end with a hash"
exten => 
s,n,Record(/var/www/html/timo/crystalrecords/${RecordingType}/${number}.gsm)
exten => 
s,n(playmsg),Playback(/var/www/html/timo/crystalrecords/${RecordingType}/${number})
exten => s,n(askuser),Background(ackrec) ;"Press 1 to replay or 2 to 
re-record, 3 to save "

exten => s,11,WaitExten(5)
exten => 1,1,Goto(s,playmsg)
exten => 2,1,Goto(s,recordmsg)  ; re-record message
exten => 3,1,Goto(4,1)
exten => 4,1,AGI($RecordingType}.php)
exten => 4,n,Return()
exten => i,1,Background(invalidentry)
exten => i,n,Goto(s,askuser)
exten => t,1,Playback(thankyoubye)
exten => t,n,Return


I know big change there eh?  Note:  I did make some changes to extension 
4, but that was fix syntax error, not because of the change from macro 
to gosub.



The difference is really how you call it.

exten => 3552,1,Gosub(sub-timo,s,1(contentdb))
exten => 3552,n,Hangup()


Also note.  I have not tested this code.  I have something similar in 
place, but not your specific code.


Oh.  You should be able to remove the 'include => timo' from the
[from-internal-custom] context.


Dale

--
_
-- 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] Incoming SIP call is rejected always.

2012-04-17 Thread Danny Nicholas
Maybe it needs to be _4001020?

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Yaroslav
Panych
Sent: Tuesday, April 17, 2012 7:38 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Incoming SIP call is rejected always.

Hi

Have an asterisk. Setup a couple of friends.
Sip.conf - http://pastebin.com/zUgiYbBi
Trying to make incoming call, and have such error(cli output)
http://pastebin.com/zFfgYcNR

NOTICE[4994]: chan_sip.c:23316 handle_request_invite: Call from 'RMT20'
(192.168.8.1:5062) to extension '4001020' rejected because extension not
found in context 'rmt-context'.
But, as you see, there is such extension.

What I'm doing wrong?

--
_
-- 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] 10.3 : sip loses registration ?

2012-04-17 Thread sean darcy

On 04/16/2012 04:09 PM, Larry Moore wrote:

I have experienced this issue with a provider with Asterisk 1.2, 1.6 & 1.8.

I never got to the root cause of the problem however it used to occur
quite frequently, now it appear to occur once every month or two -
haven't seen it occur for a while now but then I have been incrementally
updating my version of asterisk, currently 1.8.11.0

The preceding events I observed was that there would be a timeout
communicating with the peer followed by retry attempts and finally a
message reporting "Wrong password", this is the point at which
registration attempts stopped despite the value in sip.conf being set to 0.

As per your observations a 'sip reload' gets things going again.

When the problem was occurring within a 24-hour period I set up an
SPA-942 phone to register to the service and captured packets between
them, I don't recall seeing any issues over a period of a few days with
the SPA phone hence was baffled by this phenomenon and have been since.

I was considering writing a script to check for the "No Authentications"
status and to then issue a 'sip reload' but as the problem is rarely
seen now I haven't had to do this.

My suspicion to the cause of the problem is that the authentication
database at the VSP may have been offline momentarily hence why the
response of a wrong password, I wasn't convinced of this as the packet
capture of the SPA-942 did not reveal any authentication errors.

Cheers,

Larry.



On 16/04/2012 10:26 PM, sean darcy wrote:

We found this morning we had no SIP connection to another site. sip
show registry on the main site gave "no authentication". sip show
peers on the other site showed the peer unspecified.

The odd part about this: doing sip reload on the main site made it all
work. Nothing else was changed.

Main site:

sip show registry

SFO:5060 N sip_outgoin 105 No Authentication Sat, 14 Apr 2012 14:48:15
4 SIP registrations.
..

PBX*CLI> sip reload
Reloading SIP
== Parsing '/etc/asterisk/sip.conf': == Found
== Parsing '/etc/asterisk/users.conf': == Found
== Using SIP TOS bits 96
== Using SIP CoS mark 3
== Parsing '/etc/asterisk/sip_notify.conf': == Found
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5

On other site:

sip show peers
.
sip_outgoing/s (Unspecified) D N 0 Unmonitored
..
13 sip peers [Monitored: 3 online, 7 offline Unmonitored: 2 online, 1
offline]

result of sip reload on main site:
-- Registered SIP 'sip_outgoing' at xxx.yyy.zzz.aaa:9345


How do I/can I set the main site to retry a registration? I've now
changed sip.conf to add:

registertimeout=20
registerattempts=0 ;Default is 0 tries, continue forever

But these are the defaults anyhow!

Thanks,

sean



Thanks for confirming this occurring.

If it happens again I'll file a bug, but it's really hard to track down 
something so sporadic.


sean


--
_
-- 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] Account code script needed.

2012-04-17 Thread Danny Nicholas
I think OP wants DISA input sent to MYSQL, so it seems to me that an AGI
would be more appropriate.  The AGI would read, do DISA, call and record the
result to the CDR without the "Ugly" dialplan SQL stuff.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Raj Mathur
(??? ?)
Sent: Tuesday, April 17, 2012 1:11 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Account code script needed.

On Tuesday 17 Apr 2012, cjwstudios wrote:
> Looking for quotes on a very simple script that will require a pin 
> number before allowing a call to be placed.  The pin number would be 
> recorded to their mysql CDR.  Thank you.

Will the DISA application do what you need?

Regards,

-- Raj
-- 
Raj Mathur  || r...@kandalaya.org   || GPG:
http://otheronepercent.blogspot.com || http://kandalaya.org || CC68
It is the mind that moves   || http://schizoid.in   || D17F

--
_
-- 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] Account code script needed.

2012-04-17 Thread Raj Mathur (राज माथुर)
On Tuesday 17 Apr 2012, cjwstudios wrote:
> Looking for quotes on a very simple script that will require a pin
> number before allowing a call to be placed.  The pin number would be
> recorded to their mysql CDR.  Thank you.

Will the DISA application do what you need?

Regards,

-- Raj
-- 
Raj Mathur  || r...@kandalaya.org   || GPG:
http://otheronepercent.blogspot.com || http://kandalaya.org || CC68
It is the mind that moves   || http://schizoid.in   || D17F

--
_
-- 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] device state of a realtime queue member

2012-04-17 Thread Matt Hamilton

I'm trying to find if a realtime queue member is paused or not from the 
dialplan.

For a "paused", "not in use" phone, DEVICE_STATE returns "not in use" only. Is 
there a function that will tell if the phone is paused or not (other than 
querying the database directly)?

Thanks,
Matt
  --
_
-- 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] Account code script needed.

2012-04-17 Thread cjwstudios
Looking for quotes on a very simple script that will require a pin
number before allowing a call to be placed.  The pin number would be
recorded to their mysql CDR.  Thank you.

--
_
-- 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] Process a variable in a string.

2012-04-17 Thread Steve Edwards

On Tue, 17 Apr 2012, Bryant Zimmerman wrote:


example: l_databaseVariableName = MyTrunk
l_databaseVariableValue = ${myglobalvar}
myglobalvar = Target_Trunk

exten => doVtype-1,1,Set(${l_databaseVariableName}=${l_databaseVariableValue}

I need variable MyTrunk to = Target_Trunk
The above sets MyTrunk to = ${myglobalvar}


set(${l_databaseVariableName}=${${l_databaseVariableValue}})

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000--
_
-- 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] ExtensionStatus event

2012-04-17 Thread Danny Nicholas
I did this in 1.4 using hints.  The most efficient (IMO) approach now would
probably to use "core show channels verbose".

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Vieri
Sent: Tuesday, April 17, 2012 5:29 AM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] ExtensionStatus event

Hi,

I'm wondering if someone has already done a web application that queries
'ExtensionStatus' events.

On my web site I have an extension listing. Next to each number I'd like to
add an icon or something that shows the extension status. I'd like this
status to be as real-time as possible. Being a web app, I was thinking of
doing javascript JSON calls to Asterisk AJAM every x seconds.

Has anyone done this already? (so I don't need to reinvent the wheel)

Are there better approaches than querying for the ExtensionSatus for each
extension on a web page listing?

Asterisk and HTTP daemon are on different machines.

Thanks,

Vieri


--
_
-- 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] Process a variable in a string.

2012-04-17 Thread Bryant Zimmerman

I have a string value from a database that has a reference to a global 
variable  ${myglobalvar}. When I set the value it sets it to
the string what is in the database and does not evulate the variable 
inside.   Any ideas how to force an evaluation as part of a set?

example: l_databaseVariableName = MyTrunk
l_databaseVariableValue = ${myglobalvar}
myglobalvar = Target_Trunk

exten => 
doVtype-1,1,Set(${l_databaseVariableName}=${l_databaseVariableValue}

I need variable MyTrunk to = Target_Trunk
The above sets MyTrunk to = ${myglobalvar}

Any suggestions would be apperciated, And I would not prefer to set the 
database value for l_databaseVariableValue to Target_Trunk Any suggestions 
would be apperciated, And I would not prefer to set the database value for 
l_databaseVariableValue to Target_Trunk Thanks
Bryant
--
_
-- 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] Custom Application recording problem

2012-04-17 Thread Billy Kaye
Greetings Dale,

Thanks for the help I have updated my file to include the macro sample you
gave me.
The system can make the recordings once I daily the required extension in
this case 3552
--- config section for 3552 -
exten => 3552,1,Macro(timo,contentdb)
exten => 3552,n,Hangup()

---Below is the macro section --
[macro-timo]
exten => s,1,Set(RecordingType=${ARG1})
exten => s,n,Set(TIMEOUT(digit)=2) ; Set Digit Timeout to 5
seconds
exten => s,n,Set(TIMEOUT(response)=2) ; Set Response Timeout to 10
seconds
exten => s,n,Answer
exten => s,n,NoOp(${CALLERID(num)})
exten => s,n,Set(number=${CALLERID(num)})
exten => s,n,NoOp(${number})
exten => s,n(recordmsg),Background(recmsg1)   ;"Please say yo message after
the beep and end with a hash"
exten => 
s,n,Record(/var/www/html/timo/crystalrecords/${RecordingType}/${number}.gsm)
exten => 
s,n(playmsg),Playback(/var/www/html/timo/crystalrecords/${RecordingType}/${n
umber})
exten => s,n(askuser),Background(ackrec) ;"Press 1 to replay or 2 to
re-record, 3 to save "
exten => s,11,WaitExten(5)
exten => 1,1,Goto(s,playmsg)
exten => 2,1,Goto(s,recordmsg)  ; re-record message
exten => 3,1,Goto(4,1)
exten => 4,AGI($RecordingType}.php)
exten => i,1,Background(invalidentry)
exten => i,n,Goto(s,askuser)
exten => t,1,Playback(thankyoubye)
exten => t,n,Return


The system does not seem to recognize the buttons that I press e.g. when I
presssed 1 it gave this error

 -- Invalid extension '1' in context 'from-internal' on SIP/261-005c
  == CDR updated on SIP/261-005c
-- Executing [i@from-internal:1] BackGround("SIP/261-005c",
"invalidentry") in new stack
--  Playing 'invalidentry.slin' (language 'en')

The detailed error log is further below


Also one thing I have seen from the logs after giving the invalidentry error
it moves to another section in my
extensions_custom.conf called rsvp.


-Below is the full extensions_custom.conf file ---
[from-internal-custom]
exten => 1234,1,Playback(demo-congrats); extensions can dial 1234
exten => 1234,2,Hangup()
exten => h,1,Hangup()
include => agentlogin
include => conferences
include => calendar-event
include => weather-wakeup
include => timo
include => rsvp

exten => 3789,1,AGI(voicesms.php)

exten => 3552,1,Macro(timo,contentdb)
exten => 3552,n,Hangup()

[agentlogin]
exten => _*.,1,Set(AGENTNUMBER=${EXTEN:5})
exten => _*.,n,NoOp(AgentNumber is ${AGENTNUMBER})
exten => _*.,n,AgentLogin(${AGENTNUMBER})
exten => _*.,n,Hangup()

 
[mm-announce]
exten => ,1,Set(CALLERID(name)="MMGETOUT")
exten => ,n,Answer
exten => ,n,Playback(conf-will-end-in)
exten => ,n,Playback(digits/5)
exten => ,n,Playback(minutes)
exten => ,n,Hangup

[conferences]
;Used by cbEnd script to play end of conference warning
exten => ,1,Answer
exten => ,n,Wait(3)
exten => ,n,CBMysql()
exten => ,n,Hangup

[calendar-event]
exten => _*7899,1,Answer
exten => _*7899,2,Playback(${FILE_CALL})
exten => _*7899,3,Wait(2)
exten => _*7899,4,Hangup()

[weather-wakeup]
exten => *61,1,Answer
exten => *61,2,AGI(nv-weather.php)
exten => *61,3,Hangup



[rsvp]
exten=> 3589,1,Background(thanks)
exten=> 3589,2,Read(choice,,1)
exten => 3589,3,AGI(rsvp.php|${choice})
exten => i,1,Background(invalidentry)
exten => i,n,Goto(3589,2)
exten => t,1,Playback(thankyoubye)
exten => t,n,Hangup

exten => *62,1,Answer
exten => *62,2,AGI(wakeup.php)
exten => *62,3,Hangup

[macro-timo]
exten => s,1,Set(RecordingType=${ARG1})
exten => s,n,Set(TIMEOUT(digit)=2) ; Set Digit Timeout to 5
seconds
exten => s,n,Set(TIMEOUT(response)=2) ; Set Response Timeout to 10
seconds
exten => s,n,Answer
exten => s,n,NoOp(${CALLERID(num)})
exten => s,n,Set(number=${CALLERID(num)})
exten => s,n,NoOp(${number})
exten => s,n(recordmsg),Background(recmsg1)   ;"Please say yo message after
the beep and end with a hash"
exten => 
s,n,Record(/var/www/html/timo/crystalrecords/${RecordingType}/${number}.gsm)
exten => 
s,n(playmsg),Playback(/var/www/html/timo/crystalrecords/${RecordingType}/${n
umber})
exten => s,n(askuser),Background(ackrec) ;"Press 1 to replay or 2 to
re-record, 3 to save "
exten => s,11,WaitExten(5)
exten => 1,1,Goto(s,playmsg)
exten => 2,1,Goto(s,recordmsg)  ; re-record message
exten => 3,1,Goto(4,1)
exten => 4,AGI($RecordingType}.php)
exten => i,1,Background(invalidentry)
exten => i,n,Goto(s,askuser)
exten => t,1,Playback(thankyoubye)
exten => t,n,Return

--Below is the full output from my logs when I call 3552-
-- Executing [3552@from-internal:1] Macro("SIP/261-005c",
"timo,contentdb") in new stack
-- Executing [s@macro-timo:1] Set("SIP/261-005c",
"RecordingType=contentdb") in new stack
-- Executing [s@macro-timo:2] Set("SIP/261-005c",
"TIMEOUT(digit)=2") in new stack
-- Digit timeout set to 2.000
-- Executing [s@macro-timo:3] Set("SIP/261-005c",
"TIMEOUT(response)=2") in new stack
   

[asterisk-users] Incoming SIP call is rejected always.

2012-04-17 Thread Yaroslav Panych
Hi

Have an asterisk. Setup a couple of friends.
Sip.conf - http://pastebin.com/zUgiYbBi
Trying to make incoming call, and have such error(cli output)
http://pastebin.com/zFfgYcNR

NOTICE[4994]: chan_sip.c:23316 handle_request_invite: Call from
'RMT20' (192.168.8.1:5062) to extension '4001020' rejected because
extension not found in context 'rmt-context'.
But, as you see, there is such extension.

What I'm doing wrong?

--
_
-- 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 1.8.11.0 Debian Squeeze packages with T.38 gateway, queue hints and fixed RFC4235 (notifycid=yes)

2012-04-17 Thread Larry Moore
The send log you have posted does not show any outgoing T.38 packets 
from your system.


I set up a test build of 1.8.11.0 using the patch recently released, I 
have difficulties sending T.38 with this patch, in fact I cannot send 
successfully however I can receive. I did however observe some outgoing 
T.38 packets. The analogue fax modem I was dialling into is under my 
control hence the log files showed there was no signalling coming from 
my ITSP,


The T.38 session on my Asterisk server show the CRP's which were sent 
from the analogue fax device during the negotiation.


The patch I have used for a while seems to give me outgoing 
functionality as well as incoming.


I can't reproduce your scenario whereby your T.38 session is 
communicating with a different gateway to the SIP server you use hence 
can only speculate that Asterisk has difficulty wanting to send T.38 SDP 
traffic when it is a different device than the SIP server it negotiates 
with.


Cheers,

Larry.

On 17/04/2012 6:47 PM, Niccolò Belli wrote:

Il 17/04/2012 01:10, Niccolò Belli ha scritto:

Tomorrow I will try without directmedia=yes.


Unfortunately it didn't help.

Niccolò

--
_
-- 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] Custom Application recording problem

2012-04-17 Thread Dale Noll

On 04/16/2012 04:09 PM, Billy Kaye wrote:

Thanks Dale,

Am not sure why it was working in 1.4 but for some reason it was ( 
Note : My Asterisk is running bundled with Elastix).

But any your suggestion worked very fine.



Glad to hear it.

Now am having one problem how can define those extensions only with in 
different contexts, the problem I see is since am

Building 3 recording applications only one will be able call its AGI file,

Say if someone calls custom extension 1114
They can record message
-Press 1 to Replay Press 2 to Re-record or Press 3 to Save the file

Also if someone calls custom extension 1115
-Press 1 to Replay Press 2 to Re-record or Press 3 to Save the file

Note Each save file selection calls a different AGI file

E.g

exten => 1,1,Goto,timo|3552|9
exten => 2,1,Goto(3552,7) ; re-record message
exten => 3,1,Goto(4,1)
exten => 4,AGI(timorec.php)



There a few ways to do it.  Probably the easiest to maintain in the long 
run would be via the use of a macro.


[macro-timo]
exten => s,1,Set(RecordingType=${ARG1})
exten => s,n,Set(TIMEOUT(digit)=2) ; Set Digit Timeout to 5 
seconds
exten => s,n,Set(TIMEOUT(response)=2) ; Set Response Timeout to 
10 seconds

exten => s,n,Answer
exten => s,n,NoOp(${CALLERID(num)})
exten => s,n,Set(number=${CALLERID(num)})
exten => s,n,NoOp(${number})
exten => s,n(recordmsg),Background(recmsg1)   ;"Please say yo message 
after the beep and end with a hash"

exten => s,n,Record(crystalrecords/${RecordingType}/${number}.gsm)
exten => s,n(playmsg),Playback(crystalrecords/${RecordingType}/${number})
exten => s,n(askuser),Background(ackrec) ;"Press 1 to replay or 2 to 
re-record, 3 to save "

exten => s,11,WaitExten(5)

exten => 1,1,Goto(s,playmsg)
exten => 2,1,Goto(s,recordmsg)  ; re-record message
exten => 3,1,Goto(4,1)
exten => 4,AGI($RecordingType}.php)

exten => i,1,Background(invalidentry)
exten => i,n,Goto(s,askuser)

exten => t,1,Playback(thankyoubye)
exten => t,n,Return

Here I have taken you original dialplan and created a macro out of it.  
I made a few other changes such as using the 'n' priority and labels to 
make the macro easier to maintain later.
This macro takes an argument which would be the recording type.  I do 
not know what the three variations you need are, but that is not really 
relevant.  When the macro is called, it will save the argument as a 
variable 'RecordingType' which is used elsewhere.  It saves the 
recording under a subdirectory of 'crystalrecords' that is the same name 
as the recording type.  When saving the message, it also calls the AGI 
as RecordingType.php, so simply name the script the same as the 
recording type.


Then, in your dialplan  you simply make calls to your macro with the 
correct argument.


[from-internal-custom]

exten => 1114,1,Macro(timo,type1)
exten => 1114,n,Hangup()

exten => 1115,1,Macro(timo,type2)
exten => 1115,n,Hangup()

exten => 1116,1,Macro(timo,type3)
exten => 1116,n,Hangup()



Dale

--
"The truth speaks for itself. I'm just the messenger."
 Lyta Alexander - Babylon 5

--
_
-- 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 1.8.11.0 Debian Squeeze packages with T.38 gateway, queue hints and fixed RFC4235 (notifycid=yes)

2012-04-17 Thread Niccolò Belli

Il 17/04/2012 01:10, Niccolò Belli ha scritto:

Tomorrow I will try without directmedia=yes.


Unfortunately it didn't help.

Niccolò

--
_
-- 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] ExtensionStatus event

2012-04-17 Thread Vieri
Hi,

I'm wondering if someone has already done a web application that queries 
'ExtensionStatus' events.

On my web site I have an extension listing. Next to each number I'd like to add 
an icon or something that shows the extension status. I'd like this status to 
be as real-time as possible. Being a web app, I was thinking of doing 
javascript JSON calls to Asterisk AJAM every x seconds.

Has anyone done this already? (so I don't need to reinvent the wheel)

Are there better approaches than querying for the ExtensionSatus for each 
extension on a web page listing?

Asterisk and HTTP daemon are on different machines.

Thanks,

Vieri


--
_
-- 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] Invite + decreasing sequence number => 500 Error?

2012-04-17 Thread Olle E. Johansson

16 apr 2012 kl. 15:31 skrev Matthew Jordan:

> It's not a bug - decrementing the CSeq header field value is directly in
> violation of RFC 3261.  From section 22.2:
> 
>   When a UAC resubmits a request with its credentials after receiving a
>   401 (Unauthorized) or 407 (Proxy Authentication Required) response,
>   it MUST increment the CSeq header field value as it would normally
>   when sending an updated request.

This only applies to the same dialog. The question here is if it is the 
same dialog. If it is, then the server indeed has a bug.

Check the Call-ID and the from tag of both requests.

/Olle
> - Original Message -
>> From: "Benoit Panizzon" 
>> To: asterisk-users@lists.digium.com
>> Sent: Monday, April 16, 2012 7:12:09 AM
>> Subject: [asterisk-users] Invite + decreasing sequence number => 500 Error?
>> 
>> Hi out there
>> 
>> We have a strange Problem here with invites.
>> 
>> We observe this SIP conversation.
>> 
>> C3 PBX <-> Asterisk
>> 
>> Case 1. Sequence Numer always increasing:
>> 
>> => Invite
>> <= 401 Unauthenticated
>> => Invite+auth with sequence number > previous Invite.
>> <= 100 Trying etc. Works OK.
>> 
>> Case 2. Sequence Number decreasing.
>> 
>> => Invite
>> <= 401 Unauthenticated
>> => Invite+auth with sequence number < previous Invite.
>> <= 500 ERROR
>> 
>> I was browsing the SIP rfc and I cannot find any clue if in this case
>> the
>> sequence numbers must be increasing (the C3 PBX is wrong) or if I
>> have sumbled
>> over an asterisk bug.
>> 
>> Is there anyone who knows?
>> 
>> Benoit Panizzon
>> --
>> I m p r o W a r e   A G-
>> __
>> 
>> Zurlindenstrasse 29 Tel  +41 61 826 93 07
>> CH-4133 PrattelnFax  +41 61 826 93 02
>> Schweiz Web  http://www.imp.ch
>> __
>> 
>> --
>> _
>> -- 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

---
o...@edvina.net - http://edvina.net 
The final Asterisk SIP Masterclass, June 11-15 in Barcelona, Spain.  - Register 
today!




--
_
-- 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] Personal queue with one agent: add calls to extension

2012-04-17 Thread Roland
To answer my own question: I stumpled upon the RetryDial function. This is
exactly what I needed! But when the function played back the audio, I
couldn't hear it. I needed to open the channel, which the Dial command
would normally do automatically. So I came up with this dialplan:

exten => 120,hint,SIP/Ton_Bl
exten => 120,1,Verbose(2, Incoming call for Ton)
  same => n,Dial(SIP/Ton_Bl,,tT)
  same => n,Verbose(2, Dial status ${DIALSTATUS})
  same => n,GotoIf($[$[${DIALSTATUS}=BUSY] |
$[${DIALSTATUS}=CHANUNAVAIL]]?:doHangup)
  same => n,Answer
  same => n,Playback(wait-moment)
  same => n,RetryDial(beep-7,10,10,SIP/Ton_Bl,60,tT)
  same => n(doHangup),Hangup

I had to test for CHANUNAVAIL as well, because when I hit a call-limit, the
returned status is not busy, but chanunavail. I needed to call-limit my
dect phones, because they share the base stastion. The base station can
only handle 3 concurrent calls, so I didn't want to occupy an extra line
with a caller just 'waiting'. This waiting could be done in Asterisk with
this solution. I added 'call-limit=1' for my dect phones in sip.conf.

Hope this is helpfull for others as well. Any other thoughts are welcome!


On Fri, Apr 13, 2012 at 10:36 AM, Roland  wrote:

> Hi,
>
> What would be the easiest way to give a SIP account his own private queue,
> so calls can be added while this account is busy?
>
> While implementing our new Asterisk based telephone system, the
> receptionist came with the 'need' to add a call in the queue for an
> extension. So if the boss on extension 100 is on the phone, she could still
> transfer the caller to this extension, and it will be queued after the
> call. The boss would hear a beep, indicating that somebody else is waiting.
> This is how our old analog PBX seems to work. After waiting a while, the
> caller would return to reception if the boss wouldn't answer (or is still
> talking).
>
> I think I can accomplish this setting up a Queue with a timeout. After the
> timeout, the user would be returned back to reception.
>
> But of course when I asked: who would you like to have a queue, the reply
> was: everybody!
>
> I think I am not all to happy with giving everybody his own personal
> queue. Doesn't really make sense, does it?
>
> Especially for our wireless DECT phones this is a problem, because I have
> a few handsets on a base station with their own extension number. The dect
> system can only handle 3 concurrent calls. I now have configured every
> handset to have his own SIP account. I could give every handset two sip
> accounts (or two lines, somehow), but then the line being in the queue,
> would congest the base station. Other dect system I have seen can handle 4
> concurrent calls. I am afraid more base stations will cause interference on
> the signal.
>
> So I think I should solve this with Asterisk. Any suggestions about
> queueing call to a extension (or SIP account actually) without having to
> configure a 'private' queue for each sip account?
>
> Thanks in advance!
>
> Kind regards,
> Roland.
>
--
_
-- 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