[asterisk-users] Outbound SIP authentication with dynamic credentials

2007-08-16 Thread Yossi Ben Hagai
Hi All,

I'm working on the following scenario:
VoIP Gateway -- Asterisk server -- Proxy server -- PSTN
   |
  XMLRPC
___
--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] Outbound SIP authentication with dynamic credentials

2007-08-16 Thread Yossi Ben Hagai
Hi All,

I'm working on the following scenario:
VoIP Gateway -- Asterisk server -- Proxy server -- PSTN
   | |
  XMLRPC  Radius
In this call flow a prepaid caller places a call over the VoIP gateway to
the Asterisk server acting as an IVR,
the server collects the user ID, PIN, and B-number and authenticate the
credentials using an XML-RPC interface and plays the balance to the
caller. so far so good.
the next step is to send an Invite message for the B-number over to the
proxy server. the issue is that the proxy server does not trust
the asterisk server and the actual call duration limit and accounting is
handled by the proxy server which requires the asterisk server to proxy-auth
itself sending the user ID and PIN details as the MD5 auth credentials.

Now the asterisk can act as a client and authenticate itself, but this
required the credentials to be hard coded on sip.conf.
currently my last resort would be to put the sip.conf on MySQL RT and create
peers dynamically for each call, but it doesn't seem like an elegant
solution.
Is there a way to specify the auth credentials on the Dial() command?

Thanks.
___
--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 accounts from MYSQL.

2007-05-27 Thread Yossi Ben Hagai

Asterisk realtime is what you are looking for. the subject is explained very
clearly including configuration examples and DB schema on the following
links:
http://www.voip-info.org/wiki-Asterisk+RealTime
http://www.asteriskdocs.org/modules/news/article.php?storyid=28

I won't go over the process as it is detailed in the links above, but
basically you should compile the asterisk-addons, configure the res_mysql
with the proper DB details, create a table to hold sip.conf and optionally
extensions.conf then configure extconfig to map the newly created tables.

Joss.


On 5/27/07, Jonson Player [EMAIL PROTECTED] wrote:


Hello,
I just want to put all my sip accounts in mysql and asterisk use it from
mysql. How can I do that, could you be more specific because I readed alot
on wiki and i'm lost... I don't know what to modify in Makefile from channel
directory. I use asterisk 1.4.4, that is already compiled and i also have
CDR in mysql. I must create manny accounts and I want to realize that from
mysql. Thank you for your support guys.


___
--Bandwidth and Colocation provided by Easynews.com http://easynews.com/--

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


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Asterisk and iBasis

2007-05-19 Thread Yossi Ben Hagai

Asterisk supports it and the good news is that you don't have to do anything
for it to work.

On 5/19/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hi,

We are currently trying to setup Asterisk with iBasis. One
question/problem we have is that Ibasis has told us to send the INVITEs to
one IP address and all media to a different IP address. How can we do that
in Asterisk?

Thanks

___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Asterisk and iBasis

2007-05-19 Thread Yossi Ben Hagai

iBasis, like many providers uses a softswitch in which separate elements
handle the signaling (SIP/H.323) and media gateways handle the media (RTP).

when you send a call with the Dial command you state iBasis signaling
address and the Asterisk sets it's own media IP/Port in the SDP. when iBasis
send back a response it states it's own media IP/Port in the SDP (which can
be different from the signaling IP) so the asterisk will know where to send
the RTP packets. so in terms of asterisk configuration you don't need to do
anything different from what you would usually do..


On 5/19/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Thanks for the prompt response, but would you care to explain this a bit
further?

It could be due to my ignorance, and if so, I apologize. But, how can we
send the INVITE to one IP and then the media to a different one? Do we just
simply send the call to the INVITE IP using the Dial command and that's it?

Thanks

On Sat, May 19, 2007 12:29 pm, Yossi Ben Hagai [EMAIL PROTECTED] said:

 Asterisk supports it and the good news is that you don't have to do
anything
 for it to work.

 On 5/19/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hi,

 We are currently trying to setup Asterisk with iBasis. One
 question/problem we have is that Ibasis has told us to send the INVITEs
to
 one IP address and all media to a different IP address. How can we do
that
 in Asterisk?

 Thanks

 ___
 --Bandwidth and Colocation provided by Easynews.com
http://easynews.com/--

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




___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Need a RTP/SIP Proxy to be used as SBC (Session Border Controller)

2007-05-13 Thread Yossi Ben Hagai

Check rtpproxy from portone for media proxy and nat traversal.
http://www.voip-info.org/wiki/view/Portaone+rtpproxy

another option is the MediaProxy from AG projects:
http://www.voip-info.org/wiki-MediaProxy

Joss.
On 5/11/07, Jean-Marc Salsa [EMAIL PROTECTED] wrote:


Hi all,

I have been using asterisk to do such kind of thing,
But I must admitt, this is not 100 % conveniant (Mainly because Asterisk
isn't a SIP Proxy).

I just wanted to know if you knew/used some kind of SBC or packages which
would deal both with SIP AND RTP !
SER/OpenSER woulc be a good SIP Proxy ... but then how to deal with RTP ?

Any tip, info greatly welcome !

Thanks,

JM

___
--Bandwidth and Colocation provided by Easynews.com http://easynews.com/--

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


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] List of telemarketers??

2007-05-09 Thread Yossi Ben Hagai

Regarding (2) - you can either provide a realtime query service supporting
web service interface which can be consumed using virtually any programming
language and it would be very easy to build an AGI script around it.
the second option would be to periodically update a flat file (csv) and
provide ftp access - this way you won't have to sustain the load of the
realtime queries as the demand grows and the numbers can be provisioned into
PBX which doesn't have public Internet access.

personally I don't have a use for such a DB, but I'm willing to help on
setting it up for the community if needed.

Joss.


On 5/9/07, Ritesh Agrawal [EMAIL PROTECTED] wrote:


Does anyone know if there is a known list of telemarketers?
Something like http://whocalled.us/ with an easier access?

We could all benefit if there was such a thing :-)
If there is enough interest, I could put up a database that everyone can
benefit from.

I just need some suggestions on:
(1) Adding new numbers based on community responses (some rule to sanity
check)
(2) Method that everyone would prefer to access the dbase.

Ritesh


___
--Bandwidth and Colocation provided by Easynews.com http://easynews.com/--

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


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Two Connected Servers Sound Quailty

2007-04-28 Thread Yossi Ben Hagai

Hi Matt,

you didn't mention what type/bw of each site Internet connection, i suggest
that you try to split the scenario into smaller pieces:
- run long term pings between the server while you make a call and check for
packet loss.
- make internal calls between extensions on the same branch and verify that
both servers work okay (eliminating Internet connectivity)
- register a UA from one site to a server on the other site, make a call and
viceversa (eliminating a problem on one of the servers).
- check for speed/duplex setting on NIC and switch port.
- check if the sound quality issues are symmetric (does both sides
experience the sound cut or it only happens on a specific site).
- make sure you don't use G.711 as it consumes bw and from the codec
list you've mentioned has the lowest tolerance to packet loss.

Since the problems are intermittent my bet is that someone in the office is
have the p2p client work overtime or sending lots emails with funny
attachments


On 4/28/07, Matt Gardner [EMAIL PROTECTED] wrote:


Ok this is my first post and I will try to keep it short.

I have searched everywhere and haven't found an answer to my question

I have two Trixbox servers that are connected over the Internet via an
IAX2 connection.  We are experiencing very poor sound quality.  I have tried
many different codecs gsm, ilbc, g729, g711 and all seem to have the same
problem. (All though g729 seems to work the best but still isn't reliable)
The problems are intermittent sometimes the sound will cut out for 3-4
seconds and other times the sound will just be loosing every other word, and
other times it sounds just fine.

Also, we have been using Skype over this same Internet connection and have
very good sound quality with very few lost words.

So here are my questions.

First, is it a correct assumption to say that because Skype works well
over this connection then I should be able to get asterisk to work over this
connect.  I am hoping that Skype isn't better then asterisk in this area.

If I should be able to get the same sound quality could you point me in
the right direction on how to achieve this.  (I have tried messing with the
jitterbuffer but haven't been able to find very good docs on how to utilize
this functionality so about all I have done is set jitterbuffer=yes)

Thanks in advance.

___
--Bandwidth and Colocation provided by Easynews.com http://easynews.com/--

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


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Re: call dispatching - legacy application

2007-04-26 Thread Yossi Ben Hagai

Hi Adriano,

I agree with Time Bandit - AGI is what you are looking for. I recently had a
similar scenario where I had the check the cid of every customer calling to
a support qeue and check the payment status against a windows CRM app. if
the customer has an unsettled debt the call is redirected to sales rep.
The call flow in your case should be something like this:
- Answer call.
- depending on the API available to the legacy VB app (or AS/400 directly)
you can either write a local script on the * server to perform the query or
host a FastAGI script on the VB app server (or on any other server that can
perform the DB query).
- The script input is the cid and the output should be a channel variable
assigned to operator exten.
- Dial the right operator based on the channel variable assigned by the
script (you can also dial the operator within the AGI - but it better to
keep AGI as simple as possible and run as little time as possible.

one last tip - keep in mind that cid is not always available (presentation
restricted) or customer may be calling from different location
(cellphone/office) which is not on your DB - so you might want to present an
IVR menu that allows the customer to enter the cid for the requested
service.

Joss

On 4/27/07, adriano ghezzi [EMAIL PROTECTED] wrote:


well more indeep the actual process is

myparser a php script connected telnet to aah manager get and parse
events
it grab cid from manager event (incoming call)
it passes cid to a legacy visual basic app that query a db on ibm as/400
the query return info about customer's status and opened tickets
now it should instruct asterisk to send the call to the right operator,
because at the moment I'm not able to do it i do:
the call get dispatched Normal way
i wait the call ends, the php parser inform another (master vb app)
that open a pop-up on the pc of the operator that processed the call
and update the customer'ts ticket

what i would like is to dispatch the call to a specific operator eg
the preferred customer's operator.

thanks to Brad.
ciao!




2007/4/26, adriano ghezzi [EMAIL PROTECTED]:
 Hy all

 need to preprocess
 1) incoming call get caller id lookup some info in my db,
 2) based on the result dispatch the call to the right operator

 step 1 is ok I developped a small .php script that connect manager and
 parse events, now I have to tell AAH do dispatch call to the right
 operator

 questions
 1) is this the right practice ?
 2) where to find a complete manager api reference, (to buy too)

 note that
 there is a legacy application that query the db actually php script
 send the request to this app and wait for response

 I'm a programmer at very first installation of AAH , just testing
capabilities

 thanks in advance for any help and suggestion.

___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] tone generation

2007-04-24 Thread Yossi Ben Hagai

Check the Milliwatt() cmd here:
http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Milliwatt
It sends 1000Hz, but you can derive from it.

Joss.


On 4/24/07, Jerry Geis [EMAIL PROTECTED] wrote:


Does asterisk have a way in the dialplan to generate tones?
Say I want to play a tone 300Hz for 3 seconds.
Can I do that?

If not, can I use some system command to generate the wav file
then just have asterisk play it?

Jerry

___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Asterisk Pix firewalls

2007-04-24 Thread Yossi Ben Hagai

I second that. the PIX has SIP fixup which allows RTP traffic to pass
dynamically based on SDP information, so you don't need to create a rule for
the RTP range - just allow SIP UDP 5060.

On 4/25/07, Tzafrir Cohen [EMAIL PROTECTED] wrote:


On Tue, Apr 24, 2007 at 11:04:53PM -0400, Lee Jenkins wrote:
 Noah Miller wrote:

 SIP:
 TCP and UDP port 5060 (signalling) - can be changed in sip.conf
 UDP ports 1-2 (RTP stream) - can be changed in rtp.conf
 

Yes. See rtp.conf (at least on your side).

Also, if the firewall understands SIP, it may be smart enough to open
the ports for the relevant RTP ports upon the beginning of a SIP
session. So consider trying not to open any port for RTP.

--
  Tzafrir Cohen
icq#16849755jabber:[EMAIL PROTECTED]
+972-50-7952406   mailto:[EMAIL PROTECTED]
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir
___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] duration sec and billing sec in cdr

2007-04-16 Thread Yossi Ben Hagai

Looks okay to me. either the number you are testing with your VoIP provider
has an automated response which answers the call at the same sec you sent
the Invite request or the provider is sending False Answer Supervision...do
a sip debug and check while you make the call.

On 4/16/07, Adam KOSA [EMAIL PROTECTED] wrote:


Hi guys,

i've installed asterisk to handle multiple voip accounts.  I've looked
at CDR configs, and managed to have cdr-csv files growing after each
call.  It would be easier to check my locak asterisk cdr's than logging
into each account and check them at the provider website.

i found that if i ring my sip softphone from my ata, bill seconds are
counted correctly.  however, if i call via a voip provider, bill seconds
are counted incorrectly.  Example:

this call went to a pstn number

New call from 551 --- 94361abcdefg (context: internal)
Dialed: SIP/[EMAIL PROTECTED]
Call start: 2007-04-14 20:10:55
Answered  : 2007-04-14 20:10:55
Call end  : 2007-04-14 20:11:10
Duration  : 15 sec
Bill  : 15 sec


this call went to my ata from the sip softphone:

New call from 551 --- 505 (context: internal)
Dialed: SIP/505|45
Call start: 2007-04-15 07:58:11
Answered  : 2007-04-15 07:58:15
Call end  : 2007-04-15 07:58:43
Duration  : 32 sec
Bill  : 28 sec


i've searched and google'd the wiki, but found only accounting software
and cdr extensions for providers, but that's not what i need.

thanks for any help
Adam
___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] duration sec and billing sec in cdr

2007-04-16 Thread Yossi Ben Hagai

The Playback command is auto-answering the call. you can use
Playback(please_wait,noanswer) to fix it.

Joss.


On 4/16/07, Adam KOSA [EMAIL PROTECTED] wrote:


Hi, and thanks for the suggestions!

Matt wrote:
 Sounds like your VoIP provider is incorrectly sending you an Answer
before
 the call actually completes.  I would contact your VoIP provider.


 I suppose it could also be possible that YOU have an Answer() statement
 that
 is only on your VoIP trunk.  I would double check that, and then contact
 your VoIP provider to see if they have any suggestions.

this is what's most likely as i have no experience in asterisk configs.
I've checked the extension.conf settins, they are:

exten = _94./_5[05][15],1,Playback(please_wait)
exten = _94./_5[05][15],n,Set(CALLERID(name)=my_voip_username)
exten = _94./_5[05][15],n,Dial(SIP/00${EXTEN:[EMAIL PROTECTED])

and for the internal numbers:

exten = _NXZ,1,Set(TIMEOUT(digit)=2)
exten = _NXZ,2,Dial(SIP/${EXTEN},45)
exten = _NXZ,3,VoiceMail(b${EXTEN})
exten = _NXZ,103,VoiceMail(u${EXTEN})

 Basically, SOMEONE (your or voipstunt) is answering the call before it
 should be answered.


i will check this with more voip providers to see if they or i have
messed up something (but it's probably going to be me, i just don't know
where to start looking).

thanks again
Adam
___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Redundant * servers

2007-04-16 Thread Yossi Ben Hagai

It's possible, have the SIP clients use SRV records for server location and
use asterisk ARA to store SIP peers and extension.conf on DB. if the users
are not behind NAT it should work.
(open)SER is much better solution for high traffic / availability setups.


On 4/16/07, J. Oquendo [EMAIL PROTECTED] wrote:


Without using Dundi or SER, any thoughts on the following anyone?
Has something similar been implemented anywhere so as to me not
having to horribly butcher code...

4 servers SIP1-4

User1 -- -- SIP1 --
\ /\
User2 -- Go to register --- SIP2 - Whereis? -- DB
/ \/
User3 -- -- SIP3 --

Where users no matter who they are, register and are passed
off to the next server in sequence... For example, ten
people are all registering right now...

User1 -- SIP1
User2 -- SIP2
User3 -- SIP3
User4 -- SIP1

And so on... where an ATA, VoIP phone, etc., would have its
information stored via database and pulled and pushed anytime
something happened with that User... Make sense?

Think of a load balanced SIP cluster if you will WITHOUT
SER or Dundi...

--

J. Oquendo
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x1383A743
sil . infiltrated @ net http://www.infiltrated.net

The happiness of society is the end of government.
John Adams


___
--Bandwidth and Colocation provided by Easynews.com --

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



___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] queue report problem

2007-04-15 Thread Yossi Ben Hagai

Here:
http://www.voip-info.org/wiki/view/Asterisk+log+queue_log


On 4/15/07, Rilawich Ango [EMAIL PROTECTED] wrote:


Where can I get the meaning of each field in queue_log?

On 4/15/07, Darryl Dunkin [EMAIL PROTECTED] wrote:
 You will probably find what you are looking for here:
 /var/log/asterisk/queue_log

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Rilawich
 Ango
 Sent: Saturday, April 14, 2007 21:07
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: [asterisk-users] queue report problem

 HI all,
   I have a queue say 5000 and there are 10 member in the queue.  When
 there is a call to the queue, the members will ring according to the
 defined strategy.  In day end, I have to create a report about the
 queue and its member.  But I found that it is very difficult to find
 the relation for the call to queue and the member who pick the call in
 CDR.  Say, caller A calls the queue, queue member 9 pick the call.  I
 want to know the caller A waiting time, conversion time for Caller A
 and member 9.  Such relationship is very difficult to find in CDR.
 Anyone have such experience and how can I get such information?
 ango
 ___
 --Bandwidth and Colocation provided by Easynews.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 ___
 --Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] MySQL query from extensions?

2007-04-14 Thread Yossi Ben Hagai

It can get confusing at first but once you get the hang of it, its a breeze.
first take a look at: http://www.voip-info.org/wiki-Asterisk+cmd+MYSQL
there is plenty of (correct)info and (working)examples on this page.

you have to \escape a space,quote and double quote, comma and backslash - so
you just write down the query the same way as it worked on the query browser
and just prepend and backslash every time you see one of these characters.
looking at your old query line:
exten = s,n,MYSQL(Query resultid ${connid} SELECT\ password\
FROM\dnislookup\ WHERE\ dnis=\'${IVR-Exten}\')
you have a backslash but no space between FROM and dnislookup. I also
dropped the quotes on the dnis=${IVR-Exten}.

the other thing that might cause some confusion is the return var for each
MYSQL(subcommand). to start you have the connect line which after execution
returns the specific connection identifier on ${connid}. now you are ready
to issue a query - the query result will be stored in ${resultid} and it
will the connection id you specifiy - ${connid} in your case.
once you got your resultset stored in ${resultid} you have the fetch line
which is used to assign the resultset into asterisk vars. the return var in
this line is ${fetchid} which lets you know if there is a row available in
your resultset (1=true, 0=false), then you specify the resultset you want to
work on - ${resultid} in your case.
this is from your old example:
exten = s,n,MYSQL(Fetch fetchid ${password} password)
the var ${password} right after fetchid is not a resultset and should be
corrected to ${resultid}.

the last parameter - password is the var which will be assigned with the
result.
to assign additional fields you simply change your query to something like
SELECT password, online, owner FROM... and your fetch to MYSQL(Fetch fetchid
${resultid} password online owner).

Joss.



On 4/14/07, Barton Fisher [EMAIL PROTECTED] wrote:


Sorry, me again..
I'm at a loss as to why your example worked and mine didn't - I was
using one of the last examples I found during my searches.
Can you tell me when/why I need to use the escape or quotes?  Is there
some basic rule to follow?  I'm asking because there is
a confusing mix of examples on google search and I'm not sure how to know.

Also, if I wish to expand the query to return additional fields (for
example online  owner) How would I add these to query and populate the
variables?

Thanks

Bart

Yossi Ben Hagai wrote:
 That's the correct syntax:

 exten = s,1,Noop()
 exten = s,n,MYSQL(Connect connid localhost root passw0rd dax)

 exten = s,n,MYSQL(Query resultid ${connid} SELECT\ password\ FROM\
 dnislookup\ WHERE\ dnis=${IVR-Exten})
 exten = s,n,MYSQL(Fetch fetchid ${resultid} password)

 exten = s,n,MYSQL(Clear ${password})
 exten = s,n,MYSQL(Disconnect ${connid})
 exten = s,n,returnpes

 On 4/14/07, *Barton Fisher* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 Sorry,
 From the logs I see:

 Apr 13 13:32:06 WARNING[19854] app_addon_sql_mysql.c: Identifier 0,
 identifier_type 2 not found in identifier list
 Apr 13 13:32:06 WARNING[19854] app_addon_sql_mysql.c: aMYSQL_fetch:
 Invalid result identifier 0 passed

 Using this:

 exten = s,1,Noop()
 exten = s,n,MYSQL(Connect connid localhost root passw0rd dax)
 exten = s,n,MYSQL(Query resultid ${connid} SELECT\ password\ FROM\
 dnislookup\ WHERE\ dnis=\'${IVR-Exten}\')
 exten = s,n,MYSQL(Fetch fetchid ${password} password)
 exten = s,n,MYSQL(Clear ${password})
 exten = s,n,MYSQL(Disconnect ${connid})
 exten = s,n,return

 Bart

 Alex Balashov wrote:
  On Fri, 13 Apr 2007, Barton Fisher said something to this effect:
 
  What wrong with this:
 
Well... what is wrong with it?  :-)
 
I'm not trying to be funny, but, what are the symptoms that it
  doesn't work?  Error output on Asterisk
 console?  Logs?  Anything you
  can provide would be helpful.
 
  -- Alex
 
  --
  Alex Balashov [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  ___
  --Bandwidth and Colocation provided by Easynews.com
 http://Easynews.com --
 
  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
 
 
 
  __ NOD32 2187 (20070413) Information __
 
  This message was checked by NOD32 antivirus system.
  http://www.eset.com
 
 
 



 ___
 --Bandwidth and Colocation provided by Easynews.com
 http://Easynews.com --

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






___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE

Re: [asterisk-users] MySQL query from extensions?

2007-04-13 Thread Yossi Ben Hagai

That's the correct syntax:

exten = s,1,Noop()
exten = s,n,MYSQL(Connect connid localhost root passw0rd dax)

exten = s,n,MYSQL(Query resultid ${connid} SELECT\ password\ FROM\
dnislookup\ WHERE\ dnis=${IVR-Exten})
exten = s,n,MYSQL(Fetch fetchid ${resultid} password)

exten = s,n,MYSQL(Clear ${password})
exten = s,n,MYSQL(Disconnect ${connid})
exten = s,n,returnpes
On 4/14/07, Barton Fisher [EMAIL PROTECTED] wrote:


Sorry,
From the logs I see:

Apr 13 13:32:06 WARNING[19854] app_addon_sql_mysql.c: Identifier 0,
identifier_type 2 not found in identifier list
Apr 13 13:32:06 WARNING[19854] app_addon_sql_mysql.c: aMYSQL_fetch:
Invalid result identifier 0 passed

Using this:

exten = s,1,Noop()
exten = s,n,MYSQL(Connect connid localhost root passw0rd dax)
exten = s,n,MYSQL(Query resultid ${connid} SELECT\ password\ FROM\
dnislookup\ WHERE\ dnis=\'${IVR-Exten}\')
exten = s,n,MYSQL(Fetch fetchid ${password} password)
exten = s,n,MYSQL(Clear ${password})
exten = s,n,MYSQL(Disconnect ${connid})
exten = s,n,return

Bart

Alex Balashov wrote:
 On Fri, 13 Apr 2007, Barton Fisher said something to this effect:

 What wrong with this:

   Well... what is wrong with it?  :-)

   I'm not trying to be funny, but, what are the symptoms that it
 doesn't work?  Error output on Asterisk console?  Logs?  Anything you
 can provide would be helpful.

 -- Alex

 --
 Alex Balashov [EMAIL PROTECTED]
 ___
 --Bandwidth and Colocation provided by Easynews.com --

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



 __ NOD32 2187 (20070413) Information __

 This message was checked by NOD32 antivirus system.
 http://www.eset.com






___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] remote SIP, no audio, or one way audio.

2007-04-09 Thread Yossi Ben Hagai

Hi Joe,

The debug trace you've enclosed is a NOTIFY message sent from * for the
message waiting feature - and is not related to the call.
You can however tell that something is wrong since the message is being
retransmitted since the server didn't receive 200 OK in reply - while it
could be due to the client being offline or not supporting this feature It
could imply a NAT issue so try to recheck your NAT configs.

can you post a full trace (starting with the INVITE message)? also you can
try to run a sniffer trace on the client side to see if it receives/sends
the messages correctly.

Joss.

On 4/9/07, Joe Acquisto [EMAIL PROTECTED] wrote:


I never get this far, apparently.   While the connection seems to be made,
and calls can be completed (rings, answers) there is no audio.   On CLI, I
can see what appears to be call being made and connected.  These are x-lite
phones (for testing, one hopes) there appears to be no codec selection
available.

I see no CODEC dialog.  What I see is six iterations of the below:

. . . .
---

Retransmitting #6 (NAT) to xx.xx.xx.xx:64909:
NOTIFY sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 192.168.0.202:5060;branch=z9hG4bK363305c9;rport
From: nsip:[EMAIL PROTECTED];tag=as67e5c857
To: nsip:[EMAIL PROTECTED];tag=9c58a77e
Contact: sip:[EMAIL PROTECTED]
Call-ID: MjY1NTgyYzQ0YTdjNmM3NTJkODE2ODM1ZmNhMWE3OGE.
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX
Max-Forwards: 70
Event: message-summary
Content-Type: application/simple-message-summary
Subscription-State: terminated;reason=timeout
Content-Length: 0
-

Does this imply anyting to anyone?

Call can be made, after this.

joe a.

**
dave cantera [EMAIL PROTECTED] Wrote: 4/7/2007 3:53 PM:
 joe,
 when I have problems with audio and other connections seem to work, I
 always look for a codec incompatibility...  use  'sip set debug peer
 extension'  and look for the codec handshaking... make sure both
 extensions have a compatible codec choice...
 daveC

 Using INVITE request as basis request - [EMAIL PROTECTED]
 Found user '401'
 Found RTP audio format 0
 Found RTP audio format 8
 Found RTP audio format 3
 Found RTP video format 99
 Peer audio RTP is at port 192.168.15.100:5004

 *Found description format PCMU for ID 0
 Found description format PCMA for ID 8
 Found description format GSM for ID 3
 Found description format H264 for ID 99

 *Capabilities: us - 0x2e (gsm|ulaw|alaw|h264), peer -
 audio=0x2e
 (gsm|ulaw|alaw|h264)/video=0x20 (h264), combined - 0x2e
 (gsm|ulaw|alaw|h264)

 Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0
 (nothing), combined - 0x0 (nothing)
 Peer audio RTP is at port 192.168.15.100:5004
 Peer video RTP is at port 192.168.15.100:5006
 Looking for 404 in inbound-video (domain sip3701.ibsonecall.com)
 list_route: hop: sip:[EMAIL PROTECTED]:5060;user=phone



 Joe Acquisto wrote:
 Steve Totaro [EMAIL PROTECTED] Wrote: 4/4/2007 8:44 PM:

 Joe Acquisto wrote:

 Attempts to do SIP thru firewall (IPCop) are unsuccessful.  using
x-lite
 softphones, for eval/testing.  They do get registered, and can call
each
 other, but mostly get no audio, sometimes one way audio.

 Suggestions/fixes?

 joe a.


 Is there NAT on both sides?  Are you using qualify?  Paint a clearer
 picture.




 Sorry, I missed your reply, till now.

 --switch
  |  | |phones
  |  |-asterisk box


|---IPcop|---internet-|-home/remote-office--
 --|sip phone

 |-ditto

 Hope that is intelligible.

 joe a

 ___
 --Bandwidth and Colocation provided by Easynews.com --

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





 --
 Building Strong Relationships w/ Intelligent Customer Service
 --

 Interlocking Business Solutions, LLC
 856-380-0894 x5000


 ___
 --Bandwidth and Colocation provided by Easynews.com --

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


___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Vonage fraud controls

2007-04-08 Thread Yossi Ben Hagai

And if they get you black-listed you can always signup with Verizon...

On 4/8/07, Dean Collins [EMAIL PROTECTED] wrote:


There's no way for them to tell if you have asterisk on the fxo port BUT
they will terminate your account if you hook it up as the outbound for an
office pumping call after call through it. What did you expect?



Regards,

Dean Collins
Cognation Pty Ltd
[EMAIL PROTECTED]
+1-212-203-4357 Ph


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:asterisk-users-
 [EMAIL PROTECTED] On Behalf Of Salvatore Giudice
 Sent: Saturday, 7 April 2007 8:07 PM
 To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
 Subject: [asterisk-users] Vonage fraud controls

 Has anyone tried pushing calls to a Vonage ATA attached to an FXO card
in
 Asterisk and had your account terminated by Vonage?

 I'm curious as to whether they will stop your service if you push too
many
 calls through their ATA in a specific period of time.

 Thanks in advance for the info, SG

 --
 Salvatore Giudice
 [EMAIL PROTECTED]

 VoIP Security Training, LLC
 http://VoIPSecurityTraining.com

 848 N. Rainbow Blvd. #1676
 Las Vegas, NV 89107
 Phone: (702)979-2906
 Fax: (212) 279-2906


 ___
 --Bandwidth and Colocation provided by Easynews.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Prompt for a PIN number to make long distance call?

2007-04-07 Thread Yossi Ben Hagai

You can set up a simple mysql table with PIN-users this makes it more
extensible and you can create a simple web interface to change to pins/add
users.
after you have set up the table just use a simple IVR construct to prompt
for the PIN, fetch it from the table and authenticate it - something like
this (wrote it on my notepad so check the syntax):
exten = _,1,Noop
exten = _,2,MYSQL(Connect connid localhost changeme changeme changeme)
exten = _,3,MYSQL(Query resultid ${connid} SELECT\ pin\ from\
user_pin_table\ where\ pin=${EXTEN})
exten = _,4,MYSQL(Fetch fetchid ${resultid} pin)
exten = _,5,Authenticate(${pin})

if the auth is okay, you can fetch the username for that PIN using
Set(CDR(accountcode)=fetched_user)

Joss.


On 4/8/07, J French [EMAIL PROTECTED] wrote:


I need to authenticate users to make long distance calls.  Basically,when
the user dials a long distance dialplan pattern, I want to prompt for his
pin and look it up against a table of pins:usernames in a file.  If it
exists, I'll use the username in the cdr accountcode and permit the call.
Authenticate() looked very promising nut I couldn't get the ma options to
work.  Any help is appreciated.  Honestly, I'm not even sure how to read an
external file and parse it from asterisk.
___
--Bandwidth and Colocation provided by Easynews.com http://easynews.com/--

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


___
--Bandwidth and Colocation provided by Easynews.com --

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