Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Apr 23, 2024 10:31 pm
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: running custom dialplan for incoming DIDs
PostPosted: Tue Oct 29, 2013 4:04 pm 
Offline

Joined: Mon Sep 03, 2012 7:45 pm
Posts: 10
Hello everyone,

I have a headache which I have been trying to solve for the last several nights without success.

My setup is : FreePBX 2.9.0.12 + Asterisk 1.8.15 + A2Billing 1.9.4 (Cuprum).

I need to setup a chanspy or extenspy functionality when one of two things happens:
- an internal office user dials "999"
- a user dials one of our external DID numbers (lets say for the sake of this example, that the external did number is 1122334455)

Preferably extenspy because the spied on extension is registered, but not always bridged, so the spying user has to wait on the line and NOT get disconnected , even after the spied on user makes a call, finishes it and hangs up, waits a few minutes and makes another call. The spying user has to hear it all.

Back when I was just doing it with Asterisk, this would have been easy:
I would stick this in the [internal] context (all office users have this as their default context):

todayspassword=1234
hard-coded-user-to-spy-on=johnsmith
exten => 999,1,Authenticate(${todayspassword})
exten => 999,n,Playback(ring)
exten => 999,n,Wait(1)
exten => 999,n,ExtenSpy(SIP/${hard-coded-user-to-spy-on})
exten => 999,n,Hangup

And I would stick this in the [incoming] context (as all incoming pstn traffic lands in this context by default):
todayspassword=1234
hard-coded-user-to-spy-on=johnsmith
exten => _1122334455,1,Authenticate(${todayspassword})
exten => _1122334455,n,Playback(ring)
exten => _1122334455,n,Wait(1)
exten => _1122334455,n,ExtenSpy(SIP/${hard-coded-user-to-spy-on})
exten => _1122334455,n,Hangup


OK, so from the above, You can see what I am trying to do / run some custom dialplan commands for both office users as well as incoming pstn traffic.

What I did in my a2b setup, which partly worked:

To get the "999" internal extenspy functionality, i put this code at the beginning of extensions_a2billing.conf in the beginning of the [a2billing] context:

todayspassword=1234
hard-coded-user-to-spy-on=johnsmith
exten => 999,1,Authenticate(${todayspassword})
exten => 999,n,Playback(ring)
exten => 999,n,Wait(1)
exten => 999,n,ExtenSpy(SIP/${hard-coded-user-to-spy-on})
exten => 999,n,Hangup

And it worked. The spying user would connect, wait for the spiedon user to bridge a call, listen to it, the spied-on user would disconnect, then brodge another call the the spying user would hear it all.
I dont know whether this is the neatest way to do it, but it worked.

But I could not get the incoming calls (from pstn) to get the same.
I did all kinds of nasty things / I setup an INCOMING DID Destination that would redirect traffic from the external DID number 1122334455 to a destination like local/999@a2billing, but this would give strange results: upon the call being made, the dialing user would hear a "local 999" recording, and then sometimes extenspy would work, but not always.
The spying user would get either disconnected when the spied-on user would end their call or would hear "IAX" recording but would not be able to spy on the next call even though it was made.
And always, the spying user would hear nothing if at the time of making their call, the spied on user would not have a call bridged. The results were pretty chaotic so I dont want to write them all down , because they might confuse the reader.

My question in a nutshell / what is the best way to run custom dialplan code when a call from the outside PSTN is made to a known and dedicated external pstn number like our example 1122334455 ?
The above is ok minus a few bugs (incoming did destination to local/999@a2billing) , or am I completely off the track ?

thanks,
Marcin


Top
 Profile  
 
 Post subject: Re: running custom dialplan for incoming DIDs
PostPosted: Thu Oct 31, 2013 11:30 am 
Offline

Joined: Mon Sep 03, 2012 7:45 pm
Posts: 10
Hi everyone, I know that the above is a long post to read through, but in a nutshell the question is, how can I run custom dialplan commands (like extenspy) for the calling party upon bridging an incoming call to one of my did numbers.

thanks


Top
 Profile  
 
 Post subject: Re: running custom dialplan for incoming DIDs
PostPosted: Thu Oct 31, 2013 5:48 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Could these not go in your a2billing-did context before you called a2billing.php in DID mode?

Joe


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 34 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group