[asterisk-users] Realtime SIP & peer status

Andrew Thomas andy at datavox.co.uk
Wed Apr 13 04:28:41 CDT 2011


Maybe I should have asked 'why do you want to put the status in to a
mySQL database'?

BTW - extensions.conf has mySQL functions built in - so no external
script is actually needed.

 	  	


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jonas
Kellens
Sent: 13 April 2011 10:25
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Realtime SIP & peer status


On 04/13/2011 11:20 AM, Ishfaq Malik wrote:
> On Wed, 2011-04-13 at 11:09 +0200, Jonas Kellens wrote:
>    
>> On 04/13/2011 10:57 AM, Ishfaq Malik wrote:
>>      
>>> On Wed, 2011-04-13 at 10:15 +0200, Jonas Kellens wrote:
>>>
>>>        
>>>> Hello,
>>>>
>>>> I'm using SIP realtime with MySQL DB.
>>>>
>>>> Is it possible to get the status of the SIP peer (free / calling) 
>>>> from this realtime DB ?
>>>>
>>>> If not, is there another way to obtain the call state of a SIP peer

>>>> ?
>>>>
>>>>          
>>> You could use core show channels in the console/via AMI to determine

>>> if any extensions are on a call or even making a call.
>>>
>>>
>>>        
>> If this information is not available, then I'm thinking of writing an

>> AGI and calling this AGI when a call is being answered. This AGI will

>> then write to the MySQL-DB the state "busy" for this SIP peer. Off 
>> course when the call ends, I need another AGi in the h-exten which 
>> writes the state "free" for this SIP peer.
>>
>> You think this will work ? Or will it put too much load on my system 
>> ?
>>
>>
>> Kind regards,
>> Jonas.
>>
>>      
> You could write a shell script to do what you suggested and pop it on 
> a cron. The info wouldn't be 100% realtime that way though but I think

> the load would be very low.
>
> Also, as someone else has suggested, you could use hints but you have 
> to add some of the code for hints directly into the extensions.conf 
> which sort of goes against the point of RealTime unless you use 
> scripts to handle that part as I myself have done.
>    

Why should I use a cron ? I can just use an AGI in extensions.conf. 
That's the closest to "realtime" I think.

How can I write information to a MySQL-DB using hints ? Please explain.


Kind regards,
Jonas.

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


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.





More information about the asterisk-users mailing list