Re: [asterisk-users] Cannot install dahdi-linux on (old) PAE kernel.

2011-05-06 Thread Bob Beers
On Fri, May 6, 2011 at 2:12 PM, Bob Beers  wrote:
> On Fri, May 6, 2011 at 1:27 PM, Bob Beers  wrote:
>> Hi Steven,
>>
>> Can you put the .spec file from dahdi-linux-kmod package up?
>
>  Nevermind, I got it. :-)
>
> Looking at it now.

Not sure if this will work, but I'd try adding, before line 86:

#Workaround for PAE
%if "%{paevar}" == "PAE"
Provides: kmod-dahdi-linux
%endif

Can't actually test it myself, sorry.

- Bob

--
_
-- 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] Cannot install dahdi-linux on (old) PAE kernel.

2011-05-06 Thread Bob Beers
On Fri, May 6, 2011 at 1:27 PM, Bob Beers  wrote:
> Hi Steven,
>
> Can you put the .spec file from dahdi-linux-kmod package up?

 Nevermind, I got it. :-)

Looking at it now.
Did you CC [Packager: Jason Parker ]?

- Bob

--
_
-- 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] Cannot install dahdi-linux on (old) PAE kernel.

2011-05-06 Thread Bob Beers
On Fri, May 6, 2011 at 11:58 AM,   wrote:
> I am trying to install dahdi-linux from packages onto an OEL5u3 server which
> has an old kernel (5.2.6.18_128) and is a PAE variant. As there are no kmod
> packages now available for this kernel I am having to build them from source
> packages.
>
>
[snip]
>     kmod-dahdi-linux is needed by
> dahdi-linux-2.4.1.2-1_centos5.i686
>
>
>
> An inspection of the kmod-dahdi-linux RPM shows that is provides
> “kmod-dahdi-linux-PAE”, not “kmod-dahdi-linux”.
>
>
>
> How do I get the dahdi-linux package to recognise the kmod PAE package as
> the right one for this kernel?

Hi Steven,

Can you put the .spec file from dahdi-linux-kmod package up?
I can get the srpm, but I'm stuck on a weak machine at the moment.
Maybe I can help you to modify it to also "provide" non-PAE requirement?

- Bob Beers

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

2011-03-25 Thread Bob Beers
On Fri, Mar 25, 2011 at 9:51 AM, Jerry Geis  wrote:
> In 1.4 there was "core show channels concise"
> This seems to be gone from 1.8.
>
> When I am using the AMI interface to get a listing of all channels
> my listing "names" are cut short.
>
> SIP/devcentos5x64_to
>
> notice above. In 1.4 it would have given me "SIP/devcentos5x64_to_am2mm"
>
> How in 1.8 do I get the FULL listing of the channels.

I think you should try all three below and see which gives you what you like:

"core show channels"
"core show channels concise"
"core show channels verbose"

>From my experience, they all "work" in 1.8, but do give different output.

-- 
HTH,
-  Bob Beers

--
_
-- 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] Failover Routing

2011-03-01 Thread Bob Beers
On Tue, Mar 1, 2011 at 8:09 AM, Deepika Nijhawan
 wrote:
> Ya, below is my routing:
> Exten => 1234,1,Dial(SIP/abc)
> Exten => 1234,n,Dial(SIP/xyz)
>
> If 1234 is unallocated on SIP/abc it returns 1 in ${HANGUPCAUSE} variable.
> For this I don't want it  to try SIP/xyz.
> But overall, if we get SIP 4xx reason then call should hangup like it sends
> back 404 not found for this case and if we get SIP 5xx response then should
> try SIP/xyz.
> Is there any way to check sip responses and do failover routing based on
> that?
>

Have you looked at SIP_HEADER() dialplan function?


Maybe you can parse Reason header in 4xx or 5xx response?

HTH,
-Bob

--
_
-- 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] Question about EuroBRI final 2 digits

2011-02-10 Thread Bob Beers
On Thu, Feb 10, 2011 at 6:08 AM, Andrew Thomas  wrote:
> This sounds like a job for DISA.
> http://www.voip-info.org/wiki/view/Asterisk+cmd+DISA to see if DISA
> helps.
>

If OP is using Asterisk18, perhaps we should direct him to look here?



cheers,
-- 
-Bob

--
_
-- 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] How to disable srtp in asterisk 1.8.2.3?

2011-02-01 Thread Bob Beers
On Tue, Feb 1, 2011 at 12:30 PM, Danny Nicholas  wrote:
> Now that my “smart” answer is out of the way, did you try
>
> -  srtpcapable=no
>
> -  in sip.conf?
>
>
>
> reference: http://www.voip-info.org/wiki/view/Asterisk+SRTP


I've been looking at the trunk (1.8.+) code recently wrt srtp configuration.

'srtpcapable' is not a parsed string in sip.conf.  The string does not even
 appear in the source code.

I would recommend that you check for all occurances of encryption=...
 in sip.conf and comment them out, though encryption=no should also work.

Can you show your sip.conf and a trace of the call with 'sip set debug on'
 that shows the a=crypto: line in the INVITE SDP?  It doesn't happen for me.
I am able to send INVITEs with or without the a=crypto: line by setting
 encryption=[yes|no] since 1.8.0-beta2.

HTH
-- 
-Bob Beers

--
_
-- 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] Mailing list question

2011-01-20 Thread Bob Beers
On Thu, Jan 20, 2011 at 12:03 PM, Danny Nicholas  wrote:
> Putting the "--" in front of it might make it go away.

If I am not mistaken it should be exactly
two dashes followed by a space on a line alone
to indicate the end of the mail content.
But not all mail readers will honor it.

-- 
-Bob Beers

--
_
-- 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] Go from CALLINGout to just CALLING

2011-01-04 Thread Bob Beers
On Tue, Jan 4, 2011 at 5:14 AM, Jonas Kellens  wrote:
> Hello list,
>
> how can I go from CALLINGout to just CALLING ?
>
> I've tried :
>
> exten => s,n,Set(newVAR=${CUT(CALLINGout,,3)})
> or
> exten => s,n,Set(newVAR=$[CUT(CALLINGout,,3)])
>
> But no result :
>
> [Jan  4 11:10:12] -- Executing [...@from-s:34] NoOp("SIP/s2-003b",
> "newVAR=") in new stack
>
>
> Asterisk 1.6.10 here.
>

I don't think CUT does what you think it does.
When using CUT, the second argument should be a delimiter, (hyphen,
pipe, comma, etc.)
I can't really tell what you are trying to achieve, but if CALLINGout
is the value
 of a variable, say X, and you want just the first 6 characters, you
could use (maybe):
exten => s,n,Set(newVAR=${X:0:6})

HTH,
-Bob

--
_
-- 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] How to append custom option to Contact: header on outgoing SIP INVITE msgs?

2010-11-19 Thread Bob Beers
The linewrapping by gmail of the patch file makes it difficult to read.
So, I added it as an attachment for any interested readers.

-- 
-Bob
--- asterisk-1.8.0-beta2.orig/channels/chan_sip.c	2010-07-26 15:59:03.0 -0400
+++ asterisk-1.8.0-beta2/channels/chan_sip.c	2010-11-05 12:18:53.0 -0400
@@ -722,6 +755,7 @@ static unsigned int global_cos_video;   
 static unsigned int global_cos_text; /*!< 802.1p class of service for text RTP packets */
 static unsigned int recordhistory;   /*!< Record SIP history. Off by default */
 static unsigned int dumphistory; /*!< Dump history to verbose before destroying SIP dialog */
+static char global_contactoption[AST_MAX_EXTENSION];/*!< string to append to Contact: for the SIP channel */
 static char global_useragent[AST_MAX_EXTENSION];/*!< Useragent for the SIP channel */
 static char global_sdpsession[AST_MAX_EXTENSION];   /*!< SDP session name for the SIP channel */
 static char global_sdpowner[AST_MAX_EXTENSION]; /*!< SDP owner name for the SIP channel */
@@ -10936,12 +12018,14 @@ static void extract_uri(struct sip_pvt *
 static void build_contact(struct sip_pvt *p)
 {
 	if (p->socket.type == SIP_TRANSPORT_UDP) {
-		ast_string_field_build(p, our_contact, "", p->exten,
-			ast_strlen_zero(p->exten) ? "" : "@", ast_sockaddr_stringify(&p->ourip));
+		ast_string_field_build(p, our_contact, "", p->exten,
+			ast_strlen_zero(p->exten) ? "" : "@", ast_sockaddr_stringify(&p->ourip),
+			ast_strlen_zero(global_contactoption) ? "" : ";", global_contactoption);
 	} else {
-		ast_string_field_build(p, our_contact, "", p->exten,
+		ast_string_field_build(p, our_contact, "", p->exten,
 			ast_strlen_zero(p->exten) ? "" : "@", ast_sockaddr_stringify(&p->ourip),
-			get_transport(p->socket.type));
+			get_transport(p->socket.type),
+			ast_strlen_zero(global_contactoption) ? "" : ";", global_contactoption);
 	}
 }
 
@@ -26403,6 +28341,8 @@ static int reload_config(enum channelrel
 			global_relaxdtmf = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "vmexten")) {
 			ast_copy_string(default_vmexten, v->value, sizeof(default_vmexten));
+		} else if (!strcasecmp(v->name, "contactoption")) {
+			ast_copy_string(global_contactoption, v->value, sizeof(global_contactoption));
 		} else if (!strcasecmp(v->name, "rtptimeout")) {
 			if ((sscanf(v->value, "%30d", &global_rtptimeout) != 1) || (global_rtptimeout < 0)) {
 ast_log(LOG_WARNING, "'%s' is not a valid RTP hold time at line %d.  Using default.\n", v->value, v->lineno);
-- 
_
-- 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] How to append custom option to Contact: header on outgoing SIP INVITE msgs?

2010-11-19 Thread Bob Beers
On Fri, Nov 5, 2010 at 10:58 AM, Bob Beers  wrote:
> Hi list,
>
> My need is to append a site specific parameter to the
>  Contact: header on all INVITEs exiting * via a SIP trunk.
> I'd like it to look something like this:
>
> Contact: 
>
> where SITE-ID=us.here is set in a config file that * parses on
>  startup.  Or in a Dial() command option? Or I don't care exactly
>  how. :-)
>
> It is possible to affect the Contact: header via a line in sip.conf:
>  register =>  toronto:welc...@192.168.1.101/contact
> but I can't get it to also accept any ;X=Y params for the
> contact.
>
> I can add a custom Contact header in the dialplan with SipAddHeader,
>  but then I have two.  SipRemoveHeader only removes headers
>  previously added by SipAddHeader, so no luck there.
>
> I have googled, and searched the asterisk-users mailing list archives
>  and not yet found a solution.  I did see some work back in 2004
>  (issues 732 and 777) which mentioned not stripping contact header
>  parameters from arriving requests/registrations, but nothing about
>  creating any such parameters.
>
> Thanks for any help/hints,

Am I on the wrong list?

I have not noticed any replies, so I have moved forward with this idea:

# cat redhat/SOURCES/asterisk-1.8.0-beta2-Contactoption-bbeers03.patch
--- asterisk-1.8.0-beta2.orig/channels/chan_sip.c   2010-07-26
15:59:03.0 -0400
+++ asterisk-1.8.0-beta2/channels/chan_sip.c2010-11-05
12:18:53.0 -0400
@@ -722,6 +755,7 @@ static unsigned int global_cos_video;
 static unsigned int global_cos_text; /*!< 802.1p class of service
for text RTP packets */
 static unsigned int recordhistory;   /*!< Record SIP history. Off
by default */
 static unsigned int dumphistory; /*!< Dump history to verbose
before destroying SIP dialog */
+static char global_contactoption[AST_MAX_EXTENSION];/*!< string
to append to Contact: for the SIP channel */
 static char global_useragent[AST_MAX_EXTENSION];/*!< Useragent
for the SIP channel */
 static char global_sdpsession[AST_MAX_EXTENSION];   /*!< SDP session
name for the SIP channel */
 static char global_sdpowner[AST_MAX_EXTENSION]; /*!< SDP owner
name for the SIP channel */
@@ -10936,12 +12018,14 @@ static void extract_uri(struct sip_pvt *
 static void build_contact(struct sip_pvt *p)
 {
if (p->socket.type == SIP_TRANSPORT_UDP) {
-   ast_string_field_build(p, our_contact, "", p->exten,
-   ast_strlen_zero(p->exten) ? "" : "@",
ast_sockaddr_stringify(&p->ourip));
+   ast_string_field_build(p, our_contact,
"", p->exten,
+   ast_strlen_zero(p->exten) ? "" : "@",
ast_sockaddr_stringify(&p->ourip),
+   ast_strlen_zero(global_contactoption) ? "" :
";", global_contactoption);
} else {
-   ast_string_field_build(p, our_contact,
"", p->exten,
+   ast_string_field_build(p, our_contact,
"", p->exten,
ast_strlen_zero(p->exten) ? "" : "@",
ast_sockaddr_stringify(&p->ourip),
-   get_transport(p->socket.type));
+   get_transport(p->socket.type),
+   ast_strlen_zero(global_contactoption) ? "" :
";", global_contactoption);
}
 }

@@ -26403,6 +28341,8 @@ static int reload_config(enum channelrel
global_relaxdtmf = ast_true(v->value);
} else if (!strcasecmp(v->name, "vmexten")) {
ast_copy_string(default_vmexten, v->value,
sizeof(default_vmexten));
+   } else if (!strcasecmp(v->name, "contactoption")) {
+   ast_copy_string(global_contactoption,
v->value, sizeof(global_contactoption));
} else if (!strcasecmp(v->name, "rtptimeout")) {
if ((sscanf(v->value, "%30d",
&global_rtptimeout) != 1) || (global_rtptimeout < 0)) {
ast_log(LOG_WARNING, "'%s' is not a
valid RTP hold time at line %d.  Using default.\n", v->value,
v->lineno);


Then I add to the [general] section of sip.conf,

contactoption=SITE-ID=us.here

and it works for me, but I still wonder if there is a better way.

-- 
Thanks,
-Bob Beers

-- 
_
-- 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 append custom option to Contact: header on outgoing SIP INVITE msgs?

2010-11-05 Thread Bob Beers
Hi list,

My need is to append a site specific parameter to the
 Contact: header on all INVITEs exiting * via a SIP trunk.
I'd like it to look something like this:

Contact: 

where SITE-ID=us.here is set in a config file that * parses on
 startup.  Or in a Dial() command option? Or I don't care exactly
 how. :-)

It is possible to affect the Contact: header via a line in sip.conf:
 register =>  toronto:welc...@192.168.1.101/contact
but I can't get it to also accept any ;X=Y params for the
contact.

I can add a custom Contact header in the dialplan with SipAddHeader,
 but then I have two.  SipRemoveHeader only removes headers
 previously added by SipAddHeader, so no luck there.

I have googled, and searched the asterisk-users mailing list archives
 and not yet found a solution.  I did see some work back in 2004
 (issues 732 and 777) which mentioned not stripping contact header
 parameters from arriving requests/registrations, but nothing about
 creating any such parameters.

Thanks for any help/hints,

-- 
-Bob Beers

-- 
_
-- 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] Gotoif changed in 1.8?

2010-11-03 Thread Bob Beers
On Wed, Nov 3, 2010 at 4:32 PM, Danny Nicholas  wrote:
> TAM, Bob! Guess I've got to go through now and "unquote" my literals...

Hi Danny,

 Glad that helped. But on second thought, maybe the better fix is to
 remove the double quotes in the Gotoif()'s, like this:

exten => s,n,Gotoif($[${TEST_RETURN} = OK]?tb-account-balance,s,ok)
exten => s,n,Gotoif($[${TEST_RETURN} = NONE]?tbstart,s,play-main)
exten => s,n,Gotoif($[${TEST_RETURN} = INVACCT]?tbstart,s,readacct)

I have noticed that the double-quotes in comparisons are literally included
 in the comparison, not 'escaped out', if that is the right expression.

-- 
-Bob

-- 
_
-- 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] Gotoif changed in 1.8?

2010-11-03 Thread Bob Beers
On Wed, Nov 3, 2010 at 4:05 PM, Danny Nicholas  wrote:
> Hi Gang,
>
>  I’m testing 1.8.0 on one of my machines and this snippet
> “chokes” on line 7 (works fine with 1.4.30)
>
> [tb-account-balance]
>
> exten => s,1,Set(BALCOUNT=0)
>
> exten => s,n,NoOp(Verbose(acct ${digitacc} pwd ${digitpwd} ))
>
> exten => s,n(runagi),Set(TEST_RETURN="NONE")
>
> exten =>
> s,n,AGI(acctbal.agi,${ABA},${digitacc},${digittype},${digitport},${CHANNEL(language)},${outtype})
>
> exten => s,n,NoOp(Verbose(bal AGI RETURNED ${TEST_RETURN} ))
>
> exten => s,n,Set(BALCOUNT=$[${BALCOUNT} + 1])
>
> exten => s,n,Gotoif($[${BALCOUNT} > 3]?tb-account-balance,s,reset_bc)
>
> exten => s,n,Gotoif($["${TEST_RETURN}" = "OK"]?tb-account-balance,s,ok)
>
> exten => s,n,Gotoif($["${TEST_RETURN}" = "NONE"]?tbstart,s,play-main)
>
> exten => s,n,Gotoif($["${TEST_RETURN}" = "INVACCT"]?tbstart,s,readacct)
>
> exten => s,n(invacct),Playback(${invacct})
>
> exten => s,n,Goto(tb-account-balance,s,runagi)
>
> exten => s,n(ok),Set(BALCOUNT=0)
>
>
>
> -- Executing [...@tb-account-balance:7] GotoIf("SIP/134-",
> "0?tb-account-balance,s,reset_bc") in new stack
>
> [Nov  3 14:23:02] WARNING[20937]: ast_expr2.fl:468 ast_yyerror:
> ast_yyerror():  syntax error: syntax error, unexpected '', expecting
> $end; Input:
>
> ""NONE"" = "OK"
>
>   ^
>

Too many double-quotes?

Try changing line 3 to:

exten => s,n(runagi),Set(TEST_RETURN=NONE)

-- 
HTH,
-Bob Beers

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