Re: [asterisk-users] AMI Originate not working

2017-05-12 Thread Faheem Muhammad
Thomas,
this code block should work for your Originate case.
This code block will dial a local channel where actual leg 1 number is
dialed. On Answer of leg1, the leg2 is called.

-

require_once('phpagi-2.20/phpagi-asmanager.php');
$asm = new AGI_AsteriskManager('phpagi.conf');
$phone_no = '1416000';
$callerid = '1416001';
$leg1_exten = '1000';

if($asm->connect()){
$channel = "Local/".$leg1_exten ."@context_leg1";
$exten = "2000";
$context = "context_leg2";
$priority = 1;
$application = "";
$data = "";
$timeout = 3;
$callerid = $callerid;
$vars = "t_trunk=$t_trunk,campaign_name=$campaign_name,ivr_name=$ivr_name";
$account = "";
$async = 1;
$actionid = "";

$status = $asm->Originate ($channel,$exten, $context, $priority,
$application, $data, $timeout, $callerid, $vars, $account, $async,
$actionid);
echo "Status: $status";
}

-

Regards,
Faheem

On Thu, May 11, 2017 at 2:18 PM, Thomas <thomasit...@gmail.com> wrote:

> Hello,
>
> I want to call an phone and if phone picked up I want to ring another
> phone.
> Or I want to connect to an running channel and then call another phone or
> move
> to an ConfBridge
>
> Iam using PHP
> $channel = 'IAX2/556-1696';
> or $channel = 'SIP/0019736363636@outbound.patton';
> $exten = '';
> $context = 'test_callout';
> $priority = '1';
>
>
> $parameters = array(
> 'Channel' => $channel,
> 'Exten' => $exten,
> 'Context' => $context,
> 'Priority' => $priority,
> );
> self::manager_com('Originate', $parameters);
>
>
> I get only this message, but no action or other information
>   == Manager 'vserver_webastmanager' logged on from 127.0.0.1
>   == Manager 'vserver_webastmanager' logged off from 127.0.0.1
>
>
> The AMI access in general should work, because I use it for another
> commands
> for example QueueAdd
>
> best regards
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] codec negotiation or transcoding issue

2017-03-14 Thread Faheem Muhammad
Hi,
I'm facing strange issue while establishing inbound calls from SIP trunks.
Provider A is sending (G729,Alaw,uLaw) offer and asterisk dial the peer
with its preferred codec order(G729,aLaw, uLaw). The peer's phone send the
codec list as (uLaw, speex) in 200 OK replay. The Peer's phone has selected
only uLaw and speed in this case.

Ideally Asterisk should establish the call on uLaw codec, but Asterisk
establish the call with two codec for this call. For downstream RTP is
established with G729 and for upstream RTP is established with uLaw codec.
This behavior cause the one way audio for some phones like Eyebeam 1.5.9
but Phonerlite latest version allow it and there is no audio issue.

Is it normal SIP RFC 3261 behavior or there is something wrong with codec
negotiation or transcoding?

I'm using Asterisk 13.14.0 with realtime chan_pjsip compiled with bundled
pjproject on centos 6.8_x64. I have tested it with Asterisk 11.x with
chan_sip and it works fine.

Please advise me how can I setup the call based on late negotiation
mechanism?

Thank you!
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Asterisk 13 externip

2016-09-15 Thread Faheem Muhammad
On Wednesday, 14 September 2016, Madushan Geethanga 
wrote:

> Hi,
>
> What is the equal option for externip in asterisk 13 with pjsip. I have
> tried
>
> external_media_address=XX.XX.XX.XX
> external_signaling_address=XX.XX.XX.XX
>
> but asterisk 13 writes local ip to the from header. any suggestions?
>
> Best Regards,
> Madushan
>
>
>

-- 
Sent from Gmail Mobile
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] chan_pjsip ignoring endpoint device state (qualify) on dial

2016-08-09 Thread Faheem Muhammad
Jacek,
This might be a bug or configuration issue, but you need to understand the
SIP Session Timers. With Session Timers you can control the round trip time
and Call Setup time of SIP Requests.
In case of GSM Network with high delay you need to set the T1 timer a
higher value like 1000ms (500 ms default). Similarly you can reduce the
Call setup time by configuring 'T2' upto you choice as per you telephony
network. Configure t1min, timert1 and timerb according to your network.
Also set session-type=uas.


Regards,
Muhammad Faheem

On Tue, Aug 9, 2016 at 12:03 PM, Jacek Konieczny <jaj...@jajcus.net> wrote:

> Hi,
>
> We have been migrating our PBX system from Asterisk 1.8 and chan_sip to
> Asterisk 13 and chan_pjsip. Things are mostly, ok, but now I have
> stumbled on a behaviour difference I don't like.
>
> With chan_pjsip when a phone went unexpectedly offline (Ethernet cable
> disconnected) Asterisk would detect this quickly (through the 'qualify'
> pings), mark the phone as 'Unavailable' and fail immediately with
> 'CHANUNAVAIL' when dialling this phone.
>
> With Asterisk 13 and chan_pjsip qualify still works for determining
> current phone availability (endpoint shown as 'Unavailable' shortly
> after disconnecting the cable), but the phone is being dialled like
> nothing is wrong – Asterisk sends the INVITE and waits for the response,
> until SIP timeout (a bit more than 30s total). That is much longer time
> until 'CHANUNAVAIL' than I expect. It is also longer than the dial
> timeout in some cases, so I would get 'NOANSWER' instead of
> 'CHANUNAVAIL' which breaks my dialplan logic.
>
> Is that that the expected behaviour, a bug or a configuration problem?
> Am I supposed to check for device availability in my dialplan?
>
> Greets,
> Jacek
>
> --
> _
> -- 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] PJSIP_DIAL_CONTACTS issue

2016-07-20 Thread Faheem Muhammad
Thanks Richord and Carlos.


On Wednesday, 20 July 2016, Carlos Chavez <cur...@telecomabmex.com> wrote:

> On 7/20/16 9:58 AM, Faheem Muhammad wrote:
>
> Hi,
> I'm facing a strange dialplan issue with a PJSIP_DIAL_CONTACTS.
>
> When I try to call an offline endpoint with PJSIP_DIAL_CONTACTS, the dial
> command breaks and the call control go to hangup block instead of next
> priority. The error in CLI says "*Dial requires an argument
> (technology/resource)*".
> This error seems legit as there are no contacts for an offline endpoint.
> The dialplan should jump to the next priority.
>
> exten => 1001,1,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})})
> exten => 1001,2,,NoOP(${DIALSTATUS})
> exten => 1001,3,Dial(PJSIP/mytrunk/sip:${mob}@10.0.0.1)
>
> exten => h,1,NoOp()
> exten => h,n,NoOP(${DIALSTATUS})
>
> ---
> If i try to dial the same offline endpoint with the below code snippet, it
> jumps to next prirorty.
> exten => 1001,1,Dial(PJSIP/${EXTEN})
> exten => 1001,2,,NoOP(${DIALSTATUS})
> exten => 1001,3,Dial(PJSIP/mytrunk/sip:${mob}@10.0.0.1)
>
> exten => h,1,NoOp()
> exten => h,n,NoOP(${DIALSTATUS})
>
> The endpoint may register from multiple device, so I always have to dial
> it all contacts. Did anyone else face such problem?
>
> My solution to this problem was to use a gotoif and check if
> PJSIP_DIAL_CONTACTS has any contacts before trying to dial, if it does not
> then I skip the dial and goto the next step.  So:
>
> exten => 1001,1,GotoIf($["${PJSIP_DIAL_CONTACTS(${EXTEN})}" = ""]?nocon)
> exten => 1001,n,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})})
> exten => 1001,n(nocon),SomethingElse
>
> --
>
> Telecomunicaciones Abiertas de México S.A. de C.V.
> Carlos Chávez
> +52 (55)9116-91161
>
>

-- 
Sent from Gmail Mobile
-- 
_
-- 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] PJSIP_DIAL_CONTACTS issue

2016-07-20 Thread Faheem Muhammad
Hi,
I'm facing a strange dialplan issue with a PJSIP_DIAL_CONTACTS.

When I try to call an offline endpoint with PJSIP_DIAL_CONTACTS, the dial
command breaks and the call control go to hangup block instead of next
priority. The error in CLI says "*Dial requires an argument
(technology/resource)*".
This error seems legit as there are no contacts for an offline endpoint.
The dialplan should jump to the next priority.

exten => 1001,1,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})})
exten => 1001,2,,NoOP(${DIALSTATUS})
exten => 1001,3,Dial(PJSIP/mytrunk/sip:${mob}@10.0.0.1)

exten => h,1,NoOp()
exten => h,n,NoOP(${DIALSTATUS})

---
If i try to dial the same offline endpoint with the below code snippet, it
jumps to next prirorty.
exten => 1001,1,Dial(PJSIP/${EXTEN})
exten => 1001,2,,NoOP(${DIALSTATUS})
exten => 1001,3,Dial(PJSIP/mytrunk/sip:${mob}@10.0.0.1)

exten => h,1,NoOp()
exten => h,n,NoOP(${DIALSTATUS})

The endpoint may register from multiple device, so I always have to dial it
all contacts. Did anyone else face such problem?

Thanks!
Faheem
-- 
_
-- 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] Authentication header in BYE packets

2016-06-23 Thread Faheem Muhammad
Strange, A BYE should be replied with 200 OK, 481 (non matching dialogid),
408 request time out or similar responses, but it should never be
challenged. Only INVITE, REGISTER and  PUBLISH requests are challenged with
401/407.
As per rfc3261 it should not challenge the BYE Requests.
*The workaround is to add a SIP Proxy(opensips/kamillio) in between your
Provider and Asterisk server and manipulate the BYE message with challenge.

Regards,
Muhammad Faheem


On Thu, Jun 23, 2016 at 12:19 AM, Owais Ahmad <millennium@gmail.com>
wrote:

> Hi all,
>
> My provider proxy expects authentication header on BYE packets as well. Is
> there a way in asterisk to add this header on BYE packets?
>
> When proxy replies with a 401 on BYE, asterisk just retransmits the BYE
> packet.
>
> Regards,
> Owais
>
> --
> _
> -- 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] Delay after Answer

2016-06-08 Thread Faheem Muhammad
Are you sure *nslookup  *command is returning as expected?
Also check the output of the below command.
>> hostname && hostname -s && hostname -f


On Tue, Jun 7, 2016 at 11:54 PM, Brent Davidson <br...@texascountrytitle.com
> wrote:

> Well, I thought I had the problem solved.  Ported everything over to PJSip
> and build RDNS records for the phones and the server, but I am still
> experiencing the problem on incoming calls.
>
>
> On 6/7/2016 1:00 PM, Faheem Muhammad wrote:
>
> I've faced the same issue. The issue was related to DNS, the reverse
> lookup query failure caused the delay around(7-9 seconds). The purpose of
> reverse lookup is to block IP Spoofing attacks.
>
> Regards,
> Faheem
>
> On Tue, Jun 7, 2016 at 7:48 PM, Brent Davidson <
> br...@texascountrytitle.com> wrote:
>
>> I am having an issue with a couple of phones where they ring, but there
>> is a long delay after the phone is picked up before the audio starts.
>>
>> My setup:
>>
>>- Server running Asterisk 13.9.1, Dahdi 2.11.1 w/ OSLEC
>>- Server is CentOS 7
>>- Quad core CPU with 16GB Ram
>>- 2 Snom 300 phones.
>>- NO NAT.  Server and phone are on the same subnet with only a
>>gigabit switch between them.
>>- Digium TDM400 analog card with 2 incoming analog PSTN lines
>>
>> When a call comes in, the system answers, IVR plays, caller dials an
>> extension, Snom 300 rings, handset picked up.  Caller continues to hear
>> ringing for another 7 to 10 seconds.  Answerer hears a click, a quick burst
>> of audio, then silence, then another click and audio is engaged.
>>
>> I have tried both SIP and RTP debugging and there are absolutely no
>> messages indicating any timeout or retransmit.  I am at a total loss.  In
>> the past I've always been able to find an answer to issues like this on my
>> own, but this time I just don't know.  I was even beginning to suspect the
>> network switch might be bad, but pinging between the server and the phones
>> shows no packet loss and 0.969ms average response time.
>>
>> What am I missing*?*
>> Thanks,
>> Brent Davidson
>>
>> --
>> _
>> -- Bandwidth and Colocation Provided by <http://www.api-digital.com>
>> http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Delay after Answer

2016-06-07 Thread Faheem Muhammad
I've faced the same issue. The issue was related to DNS, the reverse lookup
query failure caused the delay around(7-9 seconds). The purpose of reverse
lookup is to block IP Spoofing attacks.

Regards,
Faheem

On Tue, Jun 7, 2016 at 7:48 PM, Brent Davidson <br...@texascountrytitle.com>
wrote:

> I am having an issue with a couple of phones where they ring, but there is
> a long delay after the phone is picked up before the audio starts.
>
> My setup:
>
>- Server running Asterisk 13.9.1, Dahdi 2.11.1 w/ OSLEC
>- Server is CentOS 7
>- Quad core CPU with 16GB Ram
>- 2 Snom 300 phones.
>- NO NAT.  Server and phone are on the same subnet with only a gigabit
>switch between them.
>- Digium TDM400 analog card with 2 incoming analog PSTN lines
>
> When a call comes in, the system answers, IVR plays, caller dials an
> extension, Snom 300 rings, handset picked up.  Caller continues to hear
> ringing for another 7 to 10 seconds.  Answerer hears a click, a quick burst
> of audio, then silence, then another click and audio is engaged.
>
> I have tried both SIP and RTP debugging and there are absolutely no
> messages indicating any timeout or retransmit.  I am at a total loss.  In
> the past I've always been able to find an answer to issues like this on my
> own, but this time I just don't know.  I was even beginning to suspect the
> network switch might be bad, but pinging between the server and the phones
> shows no packet loss and 0.969ms average response time.
>
> What am I missing*?*
> Thanks,
> Brent Davidson
>
> --
> _
> -- 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] Want to detect sound

2016-06-07 Thread Faheem Muhammad
Try MixMonitor. Land the call to a local channel and answer it.
This code will record the silence as well.

exten => _X.,1,MixMonitor()
exten => _X.,n,Dial(Local/100@context1)

[context1]
exten => _X.,1,Answer()
exten => _X.,n,Dial(SIP/${EXTEN}


On Tue, Jun 7, 2016 at 2:16 PM, Mamadou NGOM  wrote:

> Hello everybody,
>
> I manage not to detect one silence with record () when I make as follows:
>
> Exten = > 0178900271, n, Record ($ ${ link_recorded_pseudos_clients }
> pseudo_ Client_Id} wav, 5,5) exten = > 0178900271, n, GotoIf ($ [" $ {STAT
> (e, RECORDED_FILE} " = "0"]? Erreur_enregistrement_PPX17_1)
>
> When I say nothing, it do not return to the stage
> "erreur_enregistrement_PPX17_1"
>
> If you can help me?
>
> Mamadou NGOM
>
> Ingénieur Télécommunications & Réseaux
>
> Mobile: *06-47-02-67-86*
>
> Skype: Mamadou Numericap
>
> NumeriCap – SAS au capital de 30.000,00€ - RCS de Toulon N° 530188432 –
> TVA FR 485301188432 – APE6110Z - ARCEP N°13/0015.
> siège social : « le Galaxie C » 526 avenue Maréchal de Lattre de Tassigny
> 83000 Toulon. mail: fina...@numericap.com 
> Centre d’exploitation : « Résidence les Coquières » 11 avenue Joseph
> Fallen - 13400 Aubagne – Tel :04.42.73.88.52
>
> --
> _
> -- 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] variable to get waittime of caller exiting queue

2016-05-18 Thread Faheem Muhammad
Israel,
You can calculate the time diff by this dialplan snippet.

---
exten =
_X.,1,Set(callstarttime=${STRFTIME(${EPOCH},,%Y%m%d)}${STRFTIME(${EPOCH},,%H%M%S)})
exten => _X.,n,Queue(queue1)
exten =
_X.,n,Set(callendtime=${STRFTIME(${EPOCH},,%Y%m%d)}${STRFTIME(${EPOCH},,%H%M%S)})
exten =_X.,n,Set(diff=$[${calltime1} -${calltime}])
exten=_X.,n,NoOp(diff)
-

Regards,
Muhammad


On Wed, May 18, 2016 at 5:05 PM, Israel Gottlieb  wrote:

> Hi all
>
> Is there anyway i could get in the dialplan  the amount of time a caller
> waited in the queue before exiting?
>
> Thanks
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
-- 
_
-- 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] Is MixMonitor command is blocking ?

2016-05-03 Thread Faheem Muhammad
MixMonitor() is non blocking command.
It sets recording instructions and jumps to next priority instantly.



On Tue, May 3, 2016 at 4:25 PM, Loic Chabert  wrote:

> Hello,
>
> I try to find informations concerning Mixmonitor command, but ... without
> success.
> MixMonitor command take at last parameter "command". This command can be a
> shell script.
>
> When record is over, and this command executed, asterisk wait for a return
> code or asterisk move to the next dialplan instruction ?
> This command is a background task or use ressources in asterisk ?
>
> For exemple, i need to send this file by mail, asterisk have to wait the
> end of upload file, or can he go to the next instruction ?
>
> Thanks,
> Regards.
> --
>
> *Loïc CHABERT - Responsable technique*
>
> *Voxity - Libérez vos Télécoms*
>
> 85 Rue des Alliés 38100 Grenoble
> Tel : 0975181257 - Fax : 04.816.801.14
> Email : loic.chab...@voxity.fr 
> Restons connectés : Site Web  - Twitter
>  - Facebook  -
> LinkedIn 
> *Nouveau !* Découvrez Voxity en vidéo : Youtube
> 
>
> --
> _
> -- 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] I want to store cdr into database

2015-09-17 Thread Faheem Muhammad
It is very simple, asterisk can log cdrs automatically by configuring
cdr_mysql.conf.
All you need to create a mysql table along with proper read/write
permissions. You can find the cdr table schema from the below link.

https://wiki.asterisk.org/wiki/display/AST/MySQL+CDR+Backend

Regards,
Muhammad Faheem

On Thu, Sep 17, 2015 at 3:21 PM, Amelye Chatila <amec...@gmail.com> wrote:

> I have asterisk 13.5 configured with a simple dial plan, 3 SIP clients two
> Laptops and smartphone with softphones installed. Now I am trying to store
> cdr into a database but not able to make a connection of ODBC drivers to
> MySQL is there an option or anything. Thanks in advance
>
> My configuration::
> *sip.conf*
>
> [general]
> trasport=udp ;Data format | sample commennt
>
> [template01](!)
> type=friend
> context=from-internal
> host=dynamic
> disallow=all
> allow=ulaw
> context=from-internal
> secret=unsecurepassword
>
> [6001](template01)
>
> [7001](template01)
> bindport=6050
>
>
> *extensions.conf*
>
> [from-internal]
> exten => 7001,1,Dial(SIP/7001,30)
> exten => 6001,1,Dial(SIP/6001,30)
>
> --
> _
> -- 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] AgentLogin() on the multiple servers?

2015-09-15 Thread Faheem Muhammad
You can achieve this by choosing one of asterisk server for pins collection
on extension 1234. When any member/extension dial that extension you need
to call a script that will make AMI connection on all servers and do
AgentLogin/QueueAdd Request.
You need to do ami login and call the AMI request QueueAdd on all server
where you have define different queues. It will make the agent login on all
Queue servers.
Below is snippet for making QueueAdd request from AMI.

-

Action: QueueAdd
Queue: supportqueue
Interface: sip/1122
Penalty: 1


Regards,
Muhammad Faheem


On Tue, Sep 15, 2015 at 3:46 AM, Shahid H <shah...@gmail.com> wrote:

> Hello,
>
> Let say all the SIP devices will be registered on the proxy like kamailio.
>
> Agent is a member of Support and Billings Queues on the asterisk servers.
> Support queue on "Server  A" and Billings Queue on "Server B" for example.
> This will be done via RealTime Queue.
>
> I want Agent to dial 1234 on a sip device and it will prompt to enter a
> pin number to Login via AgentLogin(). Agent will stay on the line after
> logged in and wait for the calls.. I understand how this work from single
> asterisk server.
>
> But how is it possible for Agent to stay on the line from multiple
> asterisk servers or how it should be done? If agent dial 1245 for logging
> in - does kamailio randomly need to pink any server and then prompt for Pin
> via AgentLogin()?
>
> Thanks
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
-- 
_
-- 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] invalid From/Contact header values

2013-12-11 Thread Muhammad Faheem
Hi,
I'm observing wrong From/Contact header values. When I try to set
CallerID(num) it has no effect in the From and Contact Headers, and these
values are the same as the dialed number.
SIP Peers are defined using asterisk realtime. If I define the SIP Peers
using sip.conf then From/Contact header value are correct.

extentions.conf
[test]
exten= 1000, 1,NoOp()
same= n,Set(CALLERID(num)=)
same= n,Set(CALLERID(name)=)
same= n,Dial(SIP/1000)

exten= 2000, 1,NoOp()
same= n,Set(CALLERID(num)=)
same= n,Set(CALLERID(name)=)
same= n,Dial(SIP/2000)


Here is the sip trace...
--- Executing [2000@test:1] NoOp(SIP/1000-0014, ) in
new stack
-- Executing [2000@test:2] Set(SIP/1000-0014,
CALLERID(num)=) in new stack
-- Executing [2000@test:3] Set(SIP/1000-0014,
CALLERID(name)=) in new stack
-- Executing [2000@test:4] Dial(SIP/1000-0014, SIP/2000) in new
stack
  == Using SIP RTP CoS mark 5
Audio is at 16264
Adding codec 14 (alaw) to SDP
Adding codec 13 (ulaw) to SDP
Adding codec 12 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 10.10.7.218:5060:
INVITE sip:2000@10.10.7.218:5060 SIP/2.0
Via: SIP/2.0/UDP my-ip:5060;branch=z9hG4bK73e9c721
Max-Forwards: 70
From:  sip:2...@sipdev.mydomain.com;tag=as2a72da29
To: sip:2000@10.10.7.218:5060
Contact: sip:2000@my-ip:5060
Call-ID: 1f75fe937c6194227e6b5a5c29f41...@sipdev.mydomain.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.5.1
Date: Wed, 11 Dec 2013 16:23:07 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 309

v=0
o=root 604923607 604923607 IN IP4 my-ip
s=Asterisk PBX 11.5.1
c=IN IP4 my-ip
t=0 0
m=audio 16264 RTP/AVP 8 0 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

---
uname -a
Linux 6g-asterisk-devel 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21
UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

asterisk -rx core show version
Asterisk 11.5.1 built by root @ 6g-asterisk-devel on a x86_64 running Linux
on 2013-10-07 10:50:45 UTC

Please suggest me, either I put the issue in issue tracker or there is some
workaround.

Thank you!
Muhammad Faheem
-- 
_
-- 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] RTP from pcap file

2013-07-29 Thread Muhammad Faheem
You can take the pcap trace using tshark or tcpdump command line linux
based tool and open the trace in wireshark. Wireshak is visual tool of
tcpdum/tshark(corss platform) and you can listen audio of each call.



On Fri, Jul 26, 2013 at 10:17 PM, Gianluca Merlo
gianluca.me...@gmail.comwrote:

 Hello James,

 Il giorno 26/lug/2013 15:50, James Bensley jwbens...@gmail.com ha
 scritto:

 
  Howdy all,
 
  Does anyone know of a niffty CLI tool for Linux that can take a PCAP
  file that was created on a SIP PBX for example, and then dump the
  payload of the various RTP streams in there into seperate files so I
  can listen to them?
 
  I can go this graphically with Wireshark, but I'd like to script it
  for automation.
 
  Cheers,
  James.

 I personally use rtpbreak

 http://dallachiesa.com/code/rtpbreak/doc/rtpbreak_en.html

 For similar tasks

 Gianluca

 --
 _
 -- 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] Handoff dial control to dialplan after AMI Originate

2013-06-19 Thread Muhammad Faheem
Your both channels legs are identical strings. It should be like this.

Action: Originate

Channel: Local/outbound1@originateDialContext

CallerID: 00311234567

Context: originateDialContext2

Exten: outbound1

Priority: 1

Variable: recipient=0031612345678,callerid1=00311234567

Timeout: 1

** **

[originateDialContext]

exten = outbound1,1,Wait(1)

exten = outbound1,n,Set(recipient=${recipient})

exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

[originateDialContext2]

exten = outbound1,1,Wait(1)

exten = outbound1,n,Dial(SIP/${callerid1}@originateChannel)



On Wed, Jun 19, 2013 at 11:20 AM, Grant Bagdasarian g...@cm.nl wrote:

 Hello,

 ** **

 I’d like to use the AMI interface to originate a call to a context in a
 dialplan, and handoff the dial control to the context.

 ** **

 Whenever I execute the below action, the recipient does ring, but when I
 answer it dials the recipient again. I believe this is because once
 answered the system is going to execute the Context/Exten/Prio in the
 Originate action?

 ** **

 Action: Originate

 Channel: Local/outbound1@originateDialContext

 CallerID: 00311234567

 Context: originateDialContext

 Exten: outbound1

 Priority: 1

 Variable: recipient=0031612345678

 Timeout: 1

 ** **

 [originateDialContext]

 exten = outbound1,1,Wait(1)

 exten = outbound1,n,Set(recipient=${recipient})

 exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

 ** **

 Anyone have an idea how to fix this?

 --
 _
 -- 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] Call Transfer question

2013-05-16 Thread Muhammad Faheem
Hi,
is possible that two sip extensions: user-1 and user-2 are connected and I
want to transfer the call from user-1 to a third user user-3.
I know it is possible through feature keys mapping in features.conf, but I
want to do this through AMI or Asterisk CLI Commands?

Please suggest if possible?

Thank you!
Muhammad Faheem
--
_
-- 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] AMI Originate issue

2013-05-11 Thread Muhammad Faheem
Hi,
I'm getting an issue while executing AMI Originate.
I'm getting extension does not exists on Originate's Response, and on the
other hand Asterisk CLI say fwrite() returned error: Broken pipe
Please suggest me what is wrong.

Muhammad Faheem

### my originate code block ...
---
# ami-script.pl
my $astman = Asterisk::AMI-new(PeerAddr = '127.0.0.1', PeerPort =
'5038', Username = 'faheem', Secret = 'secret');
die Unable to connect to asterisk unless
($astman);
my $resp_code = $astman-send_action({Action =
'Originate',
Channel =
'Local/11223344',
Context = 'users',
Exten = 100,
Priority =1 });
sleep(2);
my $response = $astman-get_response($resp_code);
print $response-{'Response'} .\n;
print $response-{'Message'} .\n;
$astman-disconnect ();

Script Output...
*Error*
*Extension does not exist*
--
;extensions.conf
;;; Asterisk Dialplan
[default]
exten = 11223344,1,NoOp(welcome)
exten = 11223344,n,Answer()
exten = h,1,NoOp(hangup...)

-
--
_
-- 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] Get Channel Variables in AMI Event NewExten

2013-05-10 Thread Muhammad Faheem
Thanks! Matthew and Dan.


On Thu, May 9, 2013 at 10:18 PM, Matthew Jordan mjor...@digium.com wrote:

 On 05/09/2013 08:16 AM, Dan Cropp wrote:
  I believe you will have to monitor for the Newexten event, then send an
  AMI Getvar command.
 
  It doesn’t make sense to pass all the possible channel variables along
  with a Newexten event.  There may be a ton of extra variables that
  someone may not want or need on the AMI.  Better to have them ask for
  specific variables that are not standard.
 
 
 
  Action: Getvar
 
  ActionID: ValueYouCanIdentify
 
  Channel: IAX2/X.X.X.X:4572-5011
 
  Variable: fu_callerid
 
 
 
  This will result in a response from AMI…
 
 
 
  Response: Success
 
  ActionID: ValueYouCanIdentify
 
  Variable: fu_callerid
 
  Value: 141688xyxzz
 
 
 
  The ActionID is very important if you want to watch for an exact
 response to your request.
 

 If you know the names of the channel variables, you can also configure
 manager to send them with every channel event.

 From manager.conf:

 ;
 ; Display certain channel variables every time a channel-oriented
 ; event is emitted:
 ;
 ;channelvars = var1,var2,var3

 So if you want fu_callerid, set:

 channelvars = fu_callerid

 And, once that variable is set, you should get a NewExten event, you
 should see the following key/value pair:

 ChanVariable(SIP/1234-0001): fu_callerid=foobar


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



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] AMI help needed

2013-05-07 Thread Faheem
You can use POE for geting AMI events.

I'm sending you a simple poe.pl file in attachment, where you will get all raw 
events, and some callbacks are implemented for particular events. 
For your case you can add few callback like conference join event, conference 
leave event.


Muhammad Faheem





 From: Pat Collins drdialt...@optonline.net
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 
asterisk-users@lists.digium.com 
Sent: Saturday, May 4, 2013 8:07 PM
Subject: [asterisk-users] AMI help needed
 


Hello group,
I put together a simple PHP based conferencing manager for Asterisk 11.3
I used ODBC MYSQL for conference IDs and PINs.  All this is working as desired 
but I would love to add an active conferences display to the front end.
It seems to me that AMI is the way to go but I have no idea how to accomplish 
this or even where to begin.
Any guidance is appreciated.
Pat...
 
 
--
_
-- 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#!/usr/bin/perl -w

use strict; 
use threads;
use threads::shared;
use warnings; 
use Data::Dumper; 
use Config::Abstract::Ini; 
use POE qw(Component::Client::Asterisk::Manager);

#my $conf = '/root/poe/db_config.ini';

#AMI-POE
my $host = 'localhost'; 
my $port = '5038'; 
my $user = 'events';
my $pass = 't3chv01p3r'; 

my $debug = 0; 
my @threadz;

POE::Component::Client::Asterisk::Manager-new(
	Alias = 'monitor',
	RemoteHost	= $host,
	RemotePort	= $port,
	Username	= $user,
	Password	= $pass,
	CallBacks	= {
		#on_event = ':all', # catchall for all manager events
		#on_dial		= {'Event' = 'Dial'},
		on_Bridge	= {'Event' = 'Bridge','Bridgestate' = 'Link'},
		#on_new_channel	= { 'Event' = 'Newchannel', },
		#on_peer_status	= { 'Event' = 'PeerStatus', },
		#on_new_callerid	= { 'Event' = 'Newcallerid', },
		#on_ring = { 'Event' = 'Newchannel', 'State' = 'Ring', },
		on_hangup	= { 'Event' = 'Hangup','Cause-txt' = 'Normal Clearing', },
		#on_cdr = { 'Event' = 'Cdr', },
	},
	inline_states = {
		#on_event	= \on_event,
		#on_newexten	= \on_newexten,
		#on_dial		= \on_dial,
		on_Bridge	= \on_Bridge,
		#on_answer	= \on_answer,
		#on_new_channel	= \on_new_channel,
		#on_peer_status	= \on_peer_status,
		#on_new_callerid	= \on_new_callerid,
		#on_ring = \on_ring,
		on_hangup	= \on_hangup,
		#on_cdr = \on_cdr,
	},
); POE::Kernel-run();

sub on_answer{
print We are in ON-Answer STATE \n;

}



sub on_Bridge{
my $input = $_[ARG0];
	#print on Bridge CALLER ID\n;
print Data::Dumper-Dump([$input]);	
}

sub on_dial{
	print on_dial\n;
}

sub on_event{
	my $input = $_[ARG0];
	# good for figuring out what manager events look like
	print Data::Dumper-Dump([$input]);
	#print on_event\n;
}

sub on_newexten{
my $input = $_[ARG0];
# good for figuring out what manager events look like
print Data::Dumper-Dump([$input]);
	my $fu_callerid = $input-{'CallerIDNum'};
	my $ext_status = $input-{'Application'};
	if($ext_status eq 'Answer'){
		print Data::Dumper-Dump([$input]);
		#my $context = '';
		#my $local_ext = '';
		#my $priority = '';
		my $channel = $input-{'Channel'};
		my $context = $input-{'Context'};
		my $local_ext = $input-{'Extension'};
		my $priority = $input-{'Priority'};	
		print here in Answer state, $channel, $context, $local_ext, $priority \n;
	}
#print on_newexten\n;

}


sub on_new_channel{
my $input = $_[ARG0];
print New Channel created\n;

}

sub on_peer_status{
}

sub on_new_callerid{
	print on_new_callerid\n;
my $input = $_[ARG0];
my @Dial_Event=Data::Dumper-Dump([$input]);
my $callerid = $input-{'CallerIDNum'};
print on_new_callerid: $callerid \n;


}




sub on_ring{

}



sub on_hangup{
my $input = $_[ARG0];
# good for figuring out what manager events look like
print Data::Dumper-Dump([$input]);
	my $fu_callerid = $input-{'ConnectedLineNum'};
	my $cause_text = $input-{'Cause-txt'};
	my $channel  = $input-{'Channel'};
		
	my $tmp0 = substr($channel,0,3);
	print leg detection...$tmp0\n;

	}
	

}


sub on_cdr{

}


--
_
-- 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] Get Channel Variables in AMI Event NewExten

2013-05-06 Thread Faheem
Hi, I'm stucked in situation, and look for a work around if possible in 
Asterisk.
I have a dialplan,

[default]
exten = 111222,n,Set(fu_callerid=141688xyxzz)
exten = _X.,n,NoOp(Callerid ${fu_callerid})
exten = _X.,n,wait(2)
exten = _X.,n,Answer()
 

When,  Answer Application is called AMI Event is triggered like this..
          'Event' = 'Newexten',
          'Privilege' = 'dialplan,all',
          'Channel' = 'IAX2/X.X.X.X:4572-5011',
          'Context' = 'default',
          'Extension' = '111222',
          'Application' = 'Answer',
          'Uniqueid' = '1367903383.682',
          'AppData' = '',
          'Priority' = '4'
--
Now my question is how can I get the variable fu_callerid in the AMI event 
block.? Please suggest any work around if possible.

Thank you!
Muhammad Faheem--
_
-- 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] changing sip port

2010-11-11 Thread Faheem
asterisk by default listen on port 5060.You simply need open the file 
/etc/asterisk/sip.conf and change these. 
udpbindaddr=0.0.0.0:6080tcpbindaddr=0.0.0.0:6080save the file and open 
asterisk console and execute sip reload.
Muhammad Faheem  


--- On Fri, 11/12/10, Baha @ SH i...@saudihome.com wrote:

From: Baha @ SH i...@saudihome.com
Subject: [asterisk-users] changing sip port
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 
asterisk-users@lists.digium.com
Date: Friday, November 12, 2010, 3:25 AM




 
 






 



Hello 

How can I run the sip service on asterisk on another port beside
5080? 

I mean asterisk will still take sip requests on port:5080 and
another custom port, lets say port:6080 

   

Thanks for any help  



   





 



-Inline Attachment Follows-

-- 
_
-- 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-Users] How do I install speex for asterisk?

2010-08-08 Thread Faheem
Try make menu and select the speex module.
make sure to do a  make clean also.

Faheem, Muhammad  VoIP Developer @ Vopium 



--- On Fri, 8/6/10, Deepika Nijhawan deepika.nijha...@oxygen8.com wrote:

From: Deepika Nijhawan deepika.nijha...@oxygen8.com
Subject: [asterisk-users] [Asterisk-Users] How do I install speex for asterisk?
To: asterisk-users@lists.digium.com
Date: Friday, August 6, 2010, 4:59 PM




 
 






 



Hi,
 

   

I
have followed steps which were mentioned on forum and given below. Still
couldn’t get speex working. On test calls getting error
“chan_sip.c: sip_call: No audio format found to offer.” 

   

# yum install speex 

# yum install speex-devel 

# cd /usr/src/asterisk 

# make clean 

# make 

# service asterisk stop 

# make install 

#
service asterisk start 

   

Also,
it is not showing speex translation on “core show translation recalc 10”.
 

   

Can
anybody please tell if missing some step in this.  

   

   

   

--- 

   

Kind
Regards, 

   

Deepika Nijhawan 

VoIP Engineer 

   

Oxygen8 Communications  

   



 



-Inline Attachment Follows-

-- 
_
-- 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] How to reuse mysql connection between AGI's

2010-08-05 Thread Faheem
Hey, Is there any way to share MySQL connection between different 
agi's.Actually when call comes to asterisk box it executes various agi scripts 
sequentially. Each script checks various values by making a 
new MySQL connection and then execute query and then disconnects. 
So, Ideally there should be one connection, and it should be reused between 
each agi and when a call is over it should be disconnected. Is there 
any mechanism to reuse single MySQL connection between agi scripts?The agi 
scripts are written in Perl
Thanks,
Faheem, M.  




  -- 
_
-- 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 play Floating point numbers?

2010-06-07 Thread Faheem
Hi all, Is there any way to play floating number using asterisk dialplan?

Thanks,Faheem
  




  -- 
_
-- 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 play Floating point numbers?

2010-06-07 Thread Faheem
Thanks Danny!  It solved my problem.

Faheem  



--- On Mon, 6/7/10, Danny Nicholas da...@debsinc.com wrote:

From: Danny Nicholas da...@debsinc.com
Subject: Re: [asterisk-users] How to play Floating point numbers?
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 
asterisk-users@lists.digium.com
Date: Monday, June 7, 2010, 6:07 PM

This won't help with the exponential number, but is happy for currency or
any floating point number.
Exten = s,1,Set(XFERMAX=100.25)
exten = s,n,SayNumber(${XFERMAX})
exten = s,n,playback(digits/dollars)
exten = s,n,Set(XFERMAXC=${CUT(XFERMAX|\.|2)})
exten = s,n,SayNumber(${XFERMAXC})
exten = s,n,playback(digits/cents)

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Philipp von
Klitzing
Sent: Monday, June 07, 2010 7:57 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] How to play Floating point numbers?

Hi!

  Hi all, Is there any way to play floating number using asterisk
  dialplan?
 
 A floating point number has an exponent and mantissa. But I don't
 suppose you'de want to know that you have 234 times 2 at the third
 power Dollars in your account.

He probably meant either overlap dial or variable length dialplans/ 
extensions. But in any case this one sentence question does need more 
details.   

Philipp


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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



  -- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] Is there any Diguim distributor in Lahore

2010-03-26 Thread Faheem
Hey, is there any Diguim distributor in Lahore,Pakistan? I need to buy X100P. 
Muhammad Faheem  




  -- 
_
-- 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] Conference Calling

2010-02-27 Thread Faheem

Hey All,
I want to implement a conference calling scenario.
Conference Call Procedure:User1 dial the User2. When call is connected put the 
current call on Hold and dial User3. When the call is connected between User1 
and User3 join the User2 in a conference room!How I can implement this 
scenario. What are generic steps to do so! 
Thanks=Muhammad Faheem  




  -- 
_
-- 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] Config Files

2009-10-14 Thread Faheem
Here is sample configuration
Just add a registry string and a sip account and send all calls to this account.
For example in dial string in extensions.conf
exten=,_X.,1,Dial(SIP/14168404...@adf)

///
;    sip.conf

; Registry string
register= adf:1...@voip-provider.com:9060

;sip account
[adf]
type=peer
host=voip-provider.com
port=9060
context=default
country=us
dtmfmode=rfc2833
restrictcid=no
canreinvite=yes
insecure=no
disallow=all
allow=ulaw
allow=alaw
allow=g729
allow=gsm
promiscredir=yes
t38_udptl=yes
qualify=25000
nat=yes



Muhammad Faheem

--- On Wed, 10/14/09, Matt mhop...@gmail.com wrote:

From: Matt mhop...@gmail.com
Subject: [asterisk-users] Config Files
To: asterisk-users@lists.digium.com
Date: Wednesday, October 14, 2009, 7:39 PM

Greetings,
I have a fresh asterisk installation.  When I install I get all of the config 
files.  What is the best way to get a 'stripped' down system with just the bare 
config files I would need to do a sip connection?


-Inline Attachment Follows-

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] multiple call

2009-10-14 Thread Faheem
Through Asterisk AMI, you can not dial multiple number at the same time. 
If you are going to implement a concurrent call scenario, then AMI would not be 
a valid choice. Multiple calls can be implemented with callfile.

Faheem  



--- On Wed, 10/14/09, kaustuva...@bbsr.syscomes.com 
kaustuva...@bbsr.syscomes.com wrote:

From: kaustuva...@bbsr.syscomes.com kaustuva...@bbsr.syscomes.com
Subject: [asterisk-users] multiple call
To: asterisk-users@lists.digium.com
Date: Wednesday, October 14, 2009, 11:44 PM

Hello,

I am using Asterisk 1.4 version.
How to dial multiple numbers per second through asterisk manager

Thanks and regards


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

[asterisk-users] How to Disable CDR for callfile?

2009-09-03 Thread Faheem
I want to do a callback scenario. Each time asterisk receive a call, it creates 
a callfile, sends back the hangup signal and dial back the extension.
Here the default CDR logging is enabled.
If a dial attempt is failed then a CDR is generated. How I do a trick to stop 
CDR logging for all callfiles, without changing the default behaviour of CDR 
logging.

I know its NoCDR() function that will disable CDR() logging, But how it will
be done in callfiles ?

Thanks,
M. Faheem



  ___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] How to Disable CDR for callfile?

2009-09-03 Thread Faheem
yes, callfile work through context. When control is in the dialplan 
context/extension/priority, I can enable/disable CDR's. Problem comes when 
asterisk dial a call and user is busy or did not answered the call. In this 
case a CDR is generated. No CDR should be generated on busy or failed call 
attemps? 
How I do it?

CallFile:

Channel: SIP/username
CallerID: callback 100
MaxRetries: 3
RetryTime: 10
WaitTime: 40
Context: bridgecall
Extension: 12129339037
Set:NoCDR
Priority: 1
Account: 123;

Thanks
M. Faheem

--- On Thu, 9/3/09, Danny Nicholas da...@debsinc.com wrote:

From: Danny Nicholas da...@debsinc.com
Subject: Re: [asterisk-users] How to Disable CDR for callfile?
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 
asterisk-users@lists.digium.com
Date: Thursday, September 3, 2009, 6:01 PM




 
 







Have your callfile work through a context
instead of dialing.  The context can disable CDR. 

   









From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Faheem

Sent: Thursday, September 03, 2009
7:57 AM

To:
asterisk-users@lists.digium.com

Subject: [asterisk-users] How to
Disable CDR for callfile? 



   


 
  
  I want to do a callback scenario. Each time asterisk
  receive a call, it creates a callfile, sends back the hangup signal and dial
  back the extension.

  Here the default CDR logging is enabled.

  If a dial attempt is failed then a CDR is generated. How I do a trick to stop 
CDR
  logging for all callfiles, without changing the default behaviour of CDR
  logging.

  

  I know its NoCDR() function that will disable CDR() logging, But how it will

  be done in callfiles ?

  

  Thanks, 
  
  
  M. Faheem 
  
     
  
  
 


   



 


-Inline Attachment Follows-

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] Multiple user registration ...

2009-08-30 Thread Faheem
The purpose of Perl script is to store user registrations records only and 
nothing else regarding call dialing. 

The script will main records like this.
User1:
IP1: 192.168.0.100  Por1: 5060
IP2: 69.30.21.10 Port2: 5060

User2:

IP1: 192.168.10.1  Por1: 5060
IP2: 192.168.10.1  Por2: 5061    


User3:


IP1: 192.168.10.121  Por1: 5060

IP2: 192.168.10.123  Por2: 5061    





and so on

No it all depends on you to store these information on files or database. 
Assume you have stored  IP/Ports in the database.

Database=cloneline
Table = users(username,ip1,port1,ip2,port2)

For dialing:
Assume username=user1 and extension =123456
exten= 123456,1,NoOp()
exten= 123456,n,MYSQL(Connect connid 'localhost' cdr dbpass cloneline)
exten= 123456,n,NoOP(Connection ID:${connid})
exten= 123456,n,MYSQL(Query resultid ${connid} SELECT\ ip1\, port1\, ip2\, 
port2\, status\ from\ users\ where\ username=user1 )
exten= 123456,n,MYSQL(Fetch fetchid ${resultid} ip1 port1 ip2 port2)
exten= 123456,n,Dial(SIP/us...@${ip1}:${port1}SIP/us...@${ip2}:${port2})


for dialing user3
username=user3 and extension =112233

exten= 112233,1,NoOp()

exten= 112233,n,MYSQL(Connect connid 'localhost' cdr dbpass cloneline)

exten= 112233,n,NoOP(Connection ID:${connid})

exten= 112233,n,MYSQL(Query resultid ${connid} SELECT\ ip1\,
port1\, ip2\, port2\, status\ from\ users\ where\ username=user3 )

exten= 112233,n,MYSQL(Fetch fetchid ${resultid} ip1 port1 ip2 port2)

exten= 112233,n,Dial(SIP/us...@${ip1}:${port1}SIP/us...@${ip2}:${port2})


Hope every thing would be clear...

 Muhammad Faheem
Software Engineer
AxVoice Inc.
307,Y Commercial,
DHA Lahore, Pakistan
+92-333-4793314
http://www.axvoice.com


--- On Fri, 8/28/09, Mauro Sergio Ferreira Brasil mauro.bra...@tqi.com.br 
wrote:

From: Mauro Sergio Ferreira Brasil mauro.bra...@tqi.com.br
Subject: Re: [asterisk-users] Multiple user registration ...
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Date: Friday, August 28, 2009, 5:38 PM

Thank you very much for all your help, Muhammad! (please let me know if 
I should call you Faheem, instead).
I'll make some tests with this script on my premises as soon as possible.

Having a look on it, I couldn't realize how it really works in 
conjunction with Asterisk.
I mean, it seems that the line cloning is acchieved by the 
creation/update of a file (with a name that matches the SIP user name) 
inside folder /var/lib/asterisk/users.
The point is that I couldn't find any similar folder on my test server, 
and a search on Google by this folder didn't returned any usefull results.
Am I missing something here ?

Suppose I want to acchieve this feature by database update.
I've noticed here that it will be a problem considering that field 
name at sip_buddies, that is my Realtime table for SIP users, have a 
UNIQUE_KEY constraint.
Moreover, I don't know what will happen on Realtime (probably an error 
or undesired behavior) that seems to be expecting just one record user 
record information.
Have you tried database approach ?

Thanks again and best regards,
Mauro.




Faheem escreveu:
 Mauro,

 Yes, you will receive simultaneous ring on all devices which are 
 registered with the same SIP User Account.

 If a SIP user is registered on multiple devices i.e. only one SIP 
 account is used and only one extension is used here in my 
 implementation, then he will ring on all registered SIP enabled 
 devices/softphones.

 Also I've tested it with following combinations of SIP enabled 
 devices/Softphones.

 1) Both ports of SPA2100 are registered with one SIP account(Same IP 
 address but different ports)
 2) The same SIP user is registered with one port of SAP2100 and the 
 same user is registered with Xten (multiple IP addresses)
 3) The same SIP User is registered with two different SIP Dialers.

 Here in these three cases I've sucessfully able to receive concurrent 
 ring on the registered devices/softphones. Also CDR are working correctly.

 The perl script works perfectly with my customization, you need to 
 modify it according to  your requirements.


 Muhammad Faheem
 Software Engineer
 AxVoice Inc.
 307,Y Commercial,
 DHA Lahore, Pakistan
 +92-333-4793314
 http://www.axvoice.com

 

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 AstriCon 2009 - October 13 - 15 Phoenix, Arizona
 Register Now: http://www.astricon.net

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

-- 
__At.,                                                                          
                                                   
   _
 
*Technology and Quality on Information*
Mauro Sérgio Ferreira Brasil
Coordenador de Projetos e Analista de Sistemas
+ mauro.bra...@tqi.com.br mailto:@tqi.com.br
: www.tqi.com.br http

Re: [asterisk-users] Multiple user registration ...

2009-08-28 Thread Faheem
Mauro, 

Yes, you will receive simultaneous ring on all devices which are registered 
with the same SIP User Account.

If a SIP user is registered on multiple devices i.e. only one SIP account is 
used and only one extension is used here in my implementation, then he will 
ring on all registered SIP enabled devices/softphones.

Also I've tested it with following combinations of SIP enabled 
devices/Softphones.

1) Both ports of SPA2100 are registered with one SIP account(Same IP address 
but different ports)
2) The same SIP user is registered with one port of SAP2100 and the same user 
is registered with Xten (multiple IP addresses)
3) The same SIP User is registered with two different SIP Dialers.

Here in these three cases I've sucessfully able to receive concurrent ring on 
the registered devices/softphones. Also CDR are working correctly.

The perl script works perfectly with my customization, you need to modify it 
according to  your requirements.


 Muhammad Faheem
Software Engineer
AxVoice Inc.
307,Y Commercial,
DHA Lahore, Pakistan
+92-333-4793314
http://www.axvoice.com 


--- On Thu, 8/27/09, Mauro Sergio Ferreira Brasil mauro.bra...@tqi.com.br 
wrote:

From: Mauro Sergio Ferreira Brasil mauro.bra...@tqi.com.br
Subject: Re: [asterisk-users] Multiple user registration ...
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Date: Thursday, August 27, 2009, 8:00 PM

Hi Muhammad, and thanks a lot for the answer.

On this moment I'm making some tests in order to collect enough 
information to participate of a meeting at the end of this day regarding 
the use of Asterisk.
I won't have time to validate your contribution before this meeting and 
this info would be very handfull.

So... could you please just clarify me if this approach you've used 
allows multiple SIP clients (softphone, ATA, VoIP-Celular) registrate 
with Asterisk using the same SIP user (like SIP/101, for example) on 
such way that if someone call this number all clients gets 
simultaneously called?

Thanks and best regards,
Mauro.




Faheem escreveu:
 Dear Mauro,

 Your requirement seems Clone line feature for asterisk. The same 
 question I've asked here in this group, a months later but could't get 
 well. But actually implemented it now!
 It is done using AMI. Here is its basic psudo code.

 # ami-event.pl
 Connect to AMI
 Read the AMI Events
 Parse the events
 If it is registration Event then store the 
 Username/IP/Ports/Technology in Database

 # dial plan
 run agi script to get all strings eg.
 first Device:       SIP/u...@192.168.0.123:5061
 second Device:  SIP/u...@10.0.0.150:6060

 The complete script is attached.



 Muhammad Faheem
 Software Engineer
 AxVoice Inc.
 307,Y Commercial,
 DHA Lahore, Pakistan
 +92-333-4793314
 http://www.axvoice.com http://advcomm.net/


 --- On *Wed, 8/26/09, Mauro Sergio Ferreira Brasil 
 /mauro.bra...@tqi.com.br/* wrote:


     From: Mauro Sergio Ferreira Brasil mauro.bra...@tqi.com.br
     Subject: [asterisk-users] Multiple user registration ...
     To: Asterisk Users Mailing List - Non-Commercial Discussion
     asterisk-users@lists.digium.com
     Date: Wednesday, August 26, 2009, 7:07 PM

     Hello there!

     We are planning to use Asterisk on our VoIP platform, and we are
     spending some brains on a way to provide the following facility: let
     some SIP user (extension) registrate with more than one client (ATA,
     SoftPhone, VoipCelular, etc) - what isn't a problem at all -,
     initiate
     calls from any of this devices that are registrated with the same
     user -
     no problems on tests too -, but also receive INVITE requests on all
     devices if someone calls this user - yeah... here the thing gets
     creepy.
     The demand is quite simple: let a user registrate with multiple
     devices
     using the same SIP user on such way that if someone call him, all
     these
     registered devices will ring and the first to take the call will
     be the
     lucky one.
     The demand, as I've said, is quite simple and logical (translated
     to our
     living world), but the reality is a very different history.

     On our tests, always is the last registered application/device that
     receives the call indication.
     And only the last one.

     We are making some tests trying to kind of deceive Asterisk on
     second,
     third, and additional, registrations so it receives from Realtime
     fake
     extensions numbers on such a way that we can use all these fake
     extensions to build a queue dinamicaly (through ARA) and provide the
     desired ring on all functionality.
     I think this will lead us to lots of SIP sinalization and multi user
     registration problems, but that was the best shot we had here
     until now.

     I would like to know if anyone had the same demand and, maybe, have
     found any viable solution to it.

     Thanks and best regards,

     -- 
     __At

Re: [asterisk-users] Multiple user registration ...

2009-08-28 Thread Faheem
Yes, Its my Name! 

Well, my DB server and asterisk servers are on different locations. For 
optimization I've used Files instead of Database queries.
Secondly the /var/lib/asterisk/user folder is a simple folder if it does not 
exists on your asterisk machine then simple create it on the specified location 
or simply change the folder path in the perl script. 

Before File handling I've used Databases for maintaing active registered users 
with multiple IP/Ports. 
The attatched perl script uses database for maintain active registration.
The structure of cloneline table should be.
DB: Cloneline 
table:users(Username,IP1,Port1,Ip2,Port2) all varchars(30)
Please adjust the table fields appropriately.

Hope this code block will solve you problems.

Muhammad Faheem
Software Engineer
AxVoice Inc.
307,Y Commercial,
DHA Lahore, Pakistan
+92-333-4793314
http://www.axvoice.com



--- On Fri, 8/28/09, Mauro Sergio Ferreira Brasil mauro.bra...@tqi.com.br 
wrote:

From: Mauro Sergio Ferreira Brasil mauro.bra...@tqi.com.br
Subject: Re: [asterisk-users] Multiple user registration ...
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Date: Friday, August 28, 2009, 5:38 PM

Thank you very much for all your help, Muhammad! (please let me know if 
I should call you Faheem, instead).
I'll make some tests with this script on my premises as soon as possible.

Having a look on it, I couldn't realize how it really works in 
conjunction with Asterisk.
I mean, it seems that the line cloning is acchieved by the 
creation/update of a file (with a name that matches the SIP user name) 
inside folder /var/lib/asterisk/users.
The point is that I couldn't find any similar folder on my test server, 
and a search on Google by this folder didn't returned any usefull results.
Am I missing something here ?

Suppose I want to acchieve this feature by database update.
I've noticed here that it will be a problem considering that field 
name at sip_buddies, that is my Realtime table for SIP users, have a 
UNIQUE_KEY constraint.
Moreover, I don't know what will happen on Realtime (probably an error 
or undesired behavior) that seems to be expecting just one record user 
record information.
Have you tried database approach ?

Thanks again and best regards,
Mauro.




Faheem escreveu:
 Mauro,

 Yes, you will receive simultaneous ring on all devices which are 
 registered with the same SIP User Account.

 If a SIP user is registered on multiple devices i.e. only one SIP 
 account is used and only one extension is used here in my 
 implementation, then he will ring on all registered SIP enabled 
 devices/softphones.

 Also I've tested it with following combinations of SIP enabled 
 devices/Softphones.

 1) Both ports of SPA2100 are registered with one SIP account(Same IP 
 address but different ports)
 2) The same SIP user is registered with one port of SAP2100 and the 
 same user is registered with Xten (multiple IP addresses)
 3) The same SIP User is registered with two different SIP Dialers.

 Here in these three cases I've sucessfully able to receive concurrent 
 ring on the registered devices/softphones. Also CDR are working correctly.

 The perl script works perfectly with my customization, you need to 
 modify it according to  your requirements.


 Muhammad Faheem
 Software Engineer
 AxVoice Inc.
 307,Y Commercial,
 DHA Lahore, Pakistan
 +92-333-4793314
 http://www.axvoice.com

 

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 AstriCon 2009 - October 13 - 15 Phoenix, Arizona
 Register Now: http://www.astricon.net

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

-- 
__At.,                                                                          
                                                   
   _
 
*Technology and Quality on Information*
Mauro Sérgio Ferreira Brasil
Coordenador de Projetos e Analista de Sistemas
+ mauro.bra...@tqi.com.br mailto:@tqi.com.br
: www.tqi.com.br http://www.tqi.com.br
( + 55 (34)3291-1700
( + 55 (34)9971-2572


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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



  

ami-events.pl-21-08
Description: Binary data
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] Multiple user registration ...

2009-08-27 Thread Faheem
Dear Mauro,

Your requirement seems Clone line feature for asterisk. The same question I've 
asked here in this group, a months later but could't get well. But actually 
implemented it now!
It is done using AMI. Here is its basic psudo code.

# ami-event.pl
Connect to AMI
Read the AMI Events 
Parse the events 
If it is registration Event then store the Username/IP/Ports/Technology in 
Database

# dial plan
run agi script to get all strings eg.
first Device:   SIP/u...@192.168.0.123:5061
second Device:  SIP/u...@10.0.0.150:6060

The complete script is attached.



Muhammad Faheem  Software Engineer
AxVoice Inc. 
  307,Y Commercial, 
DHA Lahore, Pakistan
+92-333-4793314
  http://www.axvoice.com

--- On Wed, 8/26/09, Mauro Sergio Ferreira Brasil mauro.bra...@tqi.com.br 
wrote:

From: Mauro Sergio Ferreira Brasil mauro.bra...@tqi.com.br
Subject: [asterisk-users] Multiple user registration ...
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Date: Wednesday, August 26, 2009, 7:07 PM

Hello there!

We are planning to use Asterisk on our VoIP platform, and we are 
spending some brains on a way to provide the following facility: let 
some SIP user (extension) registrate with more than one client (ATA, 
SoftPhone, VoipCelular, etc) - what isn't a problem at all -, initiate 
calls from any of this devices that are registrated with the same user - 
no problems on tests too -, but also receive INVITE requests on all 
devices if someone calls this user - yeah... here the thing gets creepy.
The demand is quite simple: let a user registrate with multiple devices 
using the same SIP user on such way that if someone call him, all these 
registered devices will ring and the first to take the call will be the 
lucky one.
The demand, as I've said, is quite simple and logical (translated to our 
living world), but the reality is a very different history.

On our tests, always is the last registered application/device that 
receives the call indication.
And only the last one.

We are making some tests trying to kind of deceive Asterisk on second, 
third, and additional, registrations so it receives from Realtime fake 
extensions numbers on such a way that we can use all these fake 
extensions to build a queue dinamicaly (through ARA) and provide the 
desired ring on all functionality.
I think this will lead us to lots of SIP sinalization and multi user 
registration problems, but that was the best shot we had here until now.

I would like to know if anyone had the same demand and, maybe, have 
found any viable solution to it.

Thanks and best regards,

-- 
__At.,                                                                          
                                                   
   _
 
*Technology and Quality on Information*
Mauro Sérgio Ferreira Brasil
Coordenador de Projetos e Analista de Sistemas
+ mauro.bra...@tqi.com.br mailto:@tqi.com.br
: www.tqi.com.br http://www.tqi.com.br
( + 55 (34)3291-1700
( + 55 (34)9971-2572


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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



  

ami-events.pl-running
Description: Binary data
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] Setting up Outgoing Trunk

2009-08-11 Thread Faheem
Hey here are the sample configuration. Create a trunk in sip.conf file, add a 
registry string.

Registry String.
register= user1:passw...@anysipprovider.com:5060

[user1]
type=peer
host=anysipprovider.com
port=5060
context=default
country=us
dtmfmode=rfc2833
restrictcid=no
canreinvite=yes
insecure=no
disallow=all
allow=ulaw
allow=alaw
allow=g729
allow=gsm
promiscredir=yes
t38_udptl=yes
qualify=25000
nat=yes

When u done that, reload sip.
sip reload 

To verify it's correct: do these  in the asterisk CLI
sip show peer user
sip show registry


Muhammad Faheem  Software Engineer
AXVoice Inc,



--- On Mon, 8/10/09, kumarshantanu shantanu1...@rediffmail.com wrote:

From: kumarshantanu shantanu1...@rediffmail.com
Subject: Re: [asterisk-users] Setting up Outgoing Trunk
To: st...@geekinter.net
Cc: asterisk-users@lists.digium.com
Date: Monday, August 10, 2009, 8:47 PM





On Thu, 06 Aug 2009 21:28:01 +0530  wrote

On 6 Aug 2009, at 16:32, kumarshantanu wrote:

 Hello Everybody,



Hi.



 I have a genuine problem in Asterisk setup.



Ok.



 I have three inbound trunks in my asterisk box, everything is



What kind of trunks.



These are sip trunks



 working fine but the only problem is when any user make an out-

 going call through his/her extension it goes with same number labeled

 on this.



Ok.



 Can we set each of these lines to have fixed outgoing numbers

 like if extn: 201 make an outgoing call the recipient should get 

 different no and if extn: 202 make an outgoing call the recipient 

 should

 get different one.



Ok.



 Please can someone help me in this.



If you show us some config, tell us trunk types and generally 'giving 

us something to go on.



What config you want from me. I am not very much friendly to asterisk,

for now I manage it from freePBX. Let me please know if I can provide you some 
more information 



 Thanks

 Shantanu



Steve





Heh



___

-- Bandwidth and Colocation Provided by http://www.api-digital.com --



AstriCon 2009 - October 13 - 15 Phoenix, Arizona

Register Now: http://www.astricon.net



asterisk-users mailing list

To UNSUBSCRIBE or update options visit:

  http://lists.digium.com/mailman/listinfo/asterisk-users



-Inline Attachment Follows-

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Re: [asterisk-users] how to implement CLONED LINE Feature in asterisk?

2009-08-05 Thread Faheem

By placing OPENSIP in front of Asterisk, we can register multiple
accounts, and we can successfully make call for Outgoing only. But in
case of incoming it fails. 



If two users are registered with asterisk or OpenSIP then the user that
is registered latest is considered to be valid, and he is able to make
calls, other user with earlier registration can not make call.

My point here is in chain_sip.c what are variables or structure that
need to maintain so that we can consider all registered users as active
users.


Thanks!
Faheem

--- On Wed, 8/5/09, D Tucny d...@tucny.com wrote:

From: D Tucny d...@tucny.com
Subject: Re: [asterisk-users] how to implement CLONED LINE Feature in asterisk?
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Date: Wednesday, August 5, 2009, 11:06 AM

2009/8/4 Faheem faheem_...@yahoo.com


how to implement CLONED LINE Feature in asterisk

Hey, I want to implement Clone Line feature in asterisk. I am using SPA-2100.
The feature should work in this way.

There are two ports in the SPA-2100 both are registered with asterisk with same 
username/password, and have the same (phone number)
























No
one on the phone 



One
phone in use 



Both
phones in use 





Incoming
Calls 



Both
phones ring 



Phone
in use receives call waiting notification, 
unused phone rings 



Both
phones receive call waiting notification 





Outgoing
Calls 



Both
phones can call out 



The
unused phone can call out 



Neither
phone can call out 







 * Inbound:
  - Both ports will ring. Whichever port is picked up first, will field the 
call.
  - Any additional calls that come in would give call waiting notification 
to the first line, and ring the second line.

  - Once the second line is being utilized, all incoming calls will be 
notifications in the form of call waiting beeps.

 * Outbound:
  - You will have the ability to dial out from port one.
  - You will be able to dial a different party on port two.


*** Note ***
 - If you have an active call on port one, and pick up port two, you 
will NOT have the same call that is currently active on port one. The Cloned 
Line will share the same voice mail and will have the same telephone number as 
the original
 telephone line.

  -  The Cloned Line is NOT a second telephone number.  The telephone number 
that is assigned to the second phone port on the device is the same telephone 
number as the number assigned to phone port one. 


In sip.conf
[line1]
username=line1
secret=line1password
type=friend
host=dynamic
context=outboundcalls
mailbox=1...@default

[line2]
username=line2


secret=line2password

type=friend

host=dynamic

context=outboundcalls

mailbox=1...@default


In extensions.conf
[default]
exten = 1234,1,NoOp(About to dial both phones)
exten = 1234,n,Macro(stdexten,${EXTEN},SIP/line1SIP/line2)
exten = 1234,n,Hangup()

or for trunk
[default]


exten = 1234,1,NoOp(About to dial both phones)

exten = 1234,n,Gosub(stdexten(${EXTEN},SIP/line1SIP/line2))

exten = 1234,n,Hangup

[asterisk-users] how to implement CLONED LINE Feature in asterisk?

2009-08-04 Thread Faheem
how to implement CLONED LINE Feature in asterisk

Hey, I want to implement Clone Line feature in asterisk. I am using SPA-2100.
The feature should work in this way.

There are two ports in the SPA-2100 both are registered with asterisk with same 
username/password, and have the same (phone number)

























No
one on the phone 



One
phone in use 



Both
phones in use 





Incoming
Calls 



Both
phones ring 



Phone
in use receives call waiting notification, 
unused phone rings 



Both
phones receive call waiting notification 





Outgoing
Calls 



Both
phones can call out 



The
unused phone can call out 



Neither
phone can call out 







 * Inbound:
  - Both ports will ring. Whichever port is picked up first, will field the 
call.
  - Any additional calls that come in would give call waiting notification 
to the first line, and ring the second line.
  - Once the second line is being utilized, all incoming calls will be 
notifications in the form of call waiting beeps.

 * Outbound:
  - You will have the ability to dial out from port one.
  - You will be able to dial a different party on port two.

*** Note ***
 - If you have an active call on port one, and pick up port two, you 
will NOT have the same call that is currently active on port one. The Cloned 
Line will share the same voice mail and will have the same telephone number as 
the original telephone line.

  -  The Cloned Line is NOT a second telephone number.  The telephone number 
that is assigned to the second phone port on the device is the same telephone 
number as the number assigned to phone port one. 

Thanks!
Faheem





  ___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

[asterisk-users] How to Play IVR and Read DTMF During Active Call?

2009-07-17 Thread Faheem
Hey, 

Is there any way to play IVR and Read DTMF during active call. 

Call Flow:
 
   USER1(initiator)  - Asterisk1 - Asterisk2 -    USER2

How I can Play IVR and Read DTMF from USER1 When both users are in active 
session.

I am able to play IVR and Read DTMF from USER2, which is not required,
When Asterisk2 Receives call from Asterisk1, it simply 
Dial(SIP/${EXTEN},,,M(macro1)) and execute the macro1. In macro1 I play the IVR 
and Read() DTMF. 

The actuall problem comes here; 
IVR is playing in USER2 side only, infact It should play on both sides.
How I overcome that oneway voice problem. Please give your sugession.
I am using asterisk 1.4 on making SIP calls in Local test environment with no 
NAT issues there.

Thank you

Muhammad Faheem




  ___
-- 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] How to count Parked calls?

2009-07-14 Thread Faheem
Hey All,

I am working on a SIP Call bridging application. Every time I receive a 
incoming call in Asteriskserver1 my AGI should alert to AsteriskServer2 and 
AsteriskServer2 should callback to AsteriskServer1 and call should be bridged 
on specified extension. 
(making call in this way is customer requirement)

Every time I receive a call in AsteriskServer1, I Park the call and through 
AGI, AsteriskServer2 callback to AsteriskServer1 with parked extension. 

My actual problem is, I can't maintain the record of Parked calls, View Parked 
Calls in dialplan. Is there any way to count or track the ParkedCalls() in the 
dialplan??

Through Asterisk CLI I can see the parked calls but I need to count the calls 
in dialplan.


Muhamamd Faheem




  ___
-- 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] Asterisk Configuration

2005-12-23 Thread Faheem Ahmed



I have installed Redhat Linux 9 and Asterisk 1.2.1 
on new computer. I need to know initial configuration of Asterisk i.e How to 
register a sip user?. What files do I have to edit?
I am new about the Asterisk
please help me
Faheem Ahmed

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