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