Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 5:14 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: $OUTNUM$ variable not showing called number
PostPosted: Thu Mar 06, 2014 10:44 am 
Offline

Joined: Thu Mar 06, 2014 10:03 am
Posts: 6
Dear List

I have run into an issue which i have tried to resolve for over 2 weeks now.
I am running Elastix 2.4.0 with a2billing 1.9.4 i am trying to create wholesale voip through a2billing. I have created the following under /etc/asterisk/extensions_custom.conf


[custom-a2billing]
exten => _X.,1,deadAGI(a2billing.php,1)
exten => _X.,n,Hangup


and under elastix pbx i have created a custom trunk and set a dial custom string to be handed over to a2billing:

Local/$OUTNUM$@custom-a2billing/n


i also created an inbound route to use this custom trunk.


However, when an inbound call comes in i get the following output on my debug and call is dropped.

elastix*CLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [24000010@from-trunk:1] Set("SIP/SIP-out-00000b64", "__FROM_DID=24000010") in new stack
-- Executing [24000010@from-trunk:2] Gosub("SIP/SIP-out-00000b64", "app-blacklist-check,s,1") in new stack
-- Executing [s@app-blacklist-check:1] GotoIf("SIP/SIP-out-00000b64", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:2] Set("SIP/SIP-out-00000b64", "CALLED_BLACKLIST=1") in new stack
-- Executing [s@app-blacklist-check:3] Return("SIP/SIP-out-00000b64", "") in new stack
-- Executing [24000010@from-trunk:3] ExecIf("SIP/SIP-out-00000b64", "0 ?Set(CALLERID(name)=22421082)") in new stack
-- Executing [24000010@from-trunk:4] Set("SIP/SIP-out-00000b64", "__CALLINGPRES_SV=allowed_not_screened") in new stack
-- Executing [24000010@from-trunk:5] Set("SIP/SIP-out-00000b64", "CALLERPRES()=allowed_not_screened") in new stack
-- Executing [24000010@from-trunk:6] Goto("SIP/SIP-out-00000b64", "ext-trunk,2,1") in new stack
-- Goto (ext-trunk,2,1)
-- Executing [2@ext-trunk:1] Set("SIP/SIP-out-00000b64", "TDIAL_STRING=Local/\\$\\{OUTNUM\\}@custom-a2billing/n") in new stack
-- Executing [2@ext-trunk:2] Set("SIP/SIP-out-00000b64", "DIAL_TRUNK=2") in new stack
-- Executing [2@ext-trunk:3] Goto("SIP/SIP-out-00000b64", "ext-trunk,tcustom,1") in new stack
-- Goto (ext-trunk,tcustom,1)
-- Executing [tcustom@ext-trunk:1] Set("SIP/SIP-out-00000b64", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [tcustom@ext-trunk:2] GotoIf("SIP/SIP-out-00000b64", "1?nomax") in new stack
-- Goto (ext-trunk,tcustom,4)
-- Executing [tcustom@ext-trunk:4] ExecIf("SIP/SIP-out-00000b64", "1?Set(CALLERPRES()=allowed_not_screened)") in new stack
-- Executing [tcustom@ext-trunk:5] Set("SIP/SIP-out-00000b64", "DIAL_NUMBER=24000010") in new stack
-- Executing [tcustom@ext-trunk:6] GosubIf("SIP/SIP-out-00000b64", "0?sub-flp-2,s,1") in new stack
-- Executing [tcustom@ext-trunk:7] Set("SIP/SIP-out-00000b64", "OUTNUM=24000010") in new stack
-- Executing [tcustom@ext-trunk:8] Set("SIP/SIP-out-00000b64", "CALLERID(number)=22421082") in new stack
-- Executing [tcustom@ext-trunk:9] Set("SIP/SIP-out-00000b64", "CALLERID(name)=22421082") in new stack
-- Executing [tcustom@ext-trunk:10] Dial("SIP/SIP-out-00000b64", "Local/\\$\\{OUTNUM\\}@custom-a2billing/n,300,") in new stack
-- Couldn't call Local/\$\{OUTNUM\}@custom-a2billing/n
== Everyone is busy/congested at this time (0:0/0/0)
-- Executing [tcustom@ext-trunk:11] Hangup("SIP/SIP-out-00000b64", "") in new stack
== Spawn extension (ext-trunk, tcustom, 11) exited non-zero on 'SIP/SIP-out-00000b64'


You can see above that the OUTNUM variable is not showing the number 24000010 as it should but instead coming up as "Local/\\$\\{OUTNUM\\}@custom-a2billing/n,300,")


When i set the custom dial string as Local/24000010@custom-a2billing/n the call works perfectly as shown below:

elastix*CLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [24000010@from-trunk:1] Set("SIP/SIP-out-00000b65", "__FROM_DID=24000010") in new stack
-- Executing [24000010@from-trunk:2] Gosub("SIP/SIP-out-00000b65", "app-blacklist-check,s,1") in new stack
-- Executing [s@app-blacklist-check:1] GotoIf("SIP/SIP-out-00000b65", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:2] Set("SIP/SIP-out-00000b65", "CALLED_BLACKLIST=1") in new stack
-- Executing [s@app-blacklist-check:3] Return("SIP/SIP-out-00000b65", "") in new stack
-- Executing [24000010@from-trunk:3] ExecIf("SIP/SIP-out-00000b65", "0 ?Set(CALLERID(name)=22421082)") in new stack
-- Executing [24000010@from-trunk:4] Set("SIP/SIP-out-00000b65", "__CALLINGPRES_SV=allowed_not_screened") in new stack
-- Executing [24000010@from-trunk:5] Set("SIP/SIP-out-00000b65", "CALLERPRES()=allowed_not_screened") in new stack
-- Executing [24000010@from-trunk:6] Goto("SIP/SIP-out-00000b65", "ext-trunk,2,1") in new stack
-- Goto (ext-trunk,2,1)
-- Executing [2@ext-trunk:1] Set("SIP/SIP-out-00000b65", "TDIAL_STRING=Local/24000010@custom-a2billing/n") in new stack
-- Executing [2@ext-trunk:2] Set("SIP/SIP-out-00000b65", "DIAL_TRUNK=2") in new stack
-- Executing [2@ext-trunk:3] Goto("SIP/SIP-out-00000b65", "ext-trunk,tcustom,1") in new stack
-- Goto (ext-trunk,tcustom,1)
-- Executing [tcustom@ext-trunk:1] Set("SIP/SIP-out-00000b65", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [tcustom@ext-trunk:2] GotoIf("SIP/SIP-out-00000b65", "1?nomax") in new stack
-- Goto (ext-trunk,tcustom,4)
-- Executing [tcustom@ext-trunk:4] ExecIf("SIP/SIP-out-00000b65", "1?Set(CALLERPRES()=allowed_not_screened)") in new stack
-- Executing [tcustom@ext-trunk:5] Set("SIP/SIP-out-00000b65", "DIAL_NUMBER=24000010") in new stack
-- Executing [tcustom@ext-trunk:6] GosubIf("SIP/SIP-out-00000b65", "0?sub-flp-2,s,1") in new stack
-- Executing [tcustom@ext-trunk:7] Set("SIP/SIP-out-00000b65", "OUTNUM=24000010") in new stack
-- Executing [tcustom@ext-trunk:8] Set("SIP/SIP-out-00000b65", "CALLERID(number)=22421082") in new stack
-- Executing [tcustom@ext-trunk:9] Set("SIP/SIP-out-00000b65", "CALLERID(name)=22421082") in new stack
-- Executing [tcustom@ext-trunk:10] Dial("SIP/SIP-out-00000b65", "Local/24000010@custom-a2billing/n,300,") in new stack
-- Called Local/24000010@custom-a2billing/n
-- Executing [24000010@custom-a2billing:1] DeadAGI("Local/24000010@custom-a2billing-000005bd;2", "a2billing.php,1") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php



Could someone please point me in the right direction if im doing something wrong??

Your help is much appreciated!

Regards


Top
 Profile  
 
 Post subject: Re: $OUTNUM$ variable not showing called number
PostPosted: Thu Mar 06, 2014 4:51 pm 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
I think creating an inbound route (you mean in FreePBX?) wouldn't be the normal way to pass the call to the dial plan.

You would normally create an a2billing customer, and assign them SIP credentials in A2Billing,

Then in the CONTEXT setting for the A2Billing SIP account set the correct dial plan context, in your case custom-a2billing

Then the customer connects with their A2Billing SIP credentials, when the call comes in the call is passed to the correct dial-plan, and then on to a2billing.

At least I think that's what you're trying to do!


Top
 Profile  
 
 Post subject: Re: $OUTNUM$ variable not showing called number
PostPosted: Thu Mar 06, 2014 6:14 pm 
Offline

Joined: Thu Mar 06, 2014 10:03 am
Posts: 6
Hi
Thanks for your prompt reply!

i will give you more detail on what i want to achieve sorry im a newbie to asterisk and a2billing :)

I have a client connected via a SIP trunk which i would like to provide postpaid wholesale international termination without the need for SIP registration, the clients credentials should only be his caller id, so the call flow is as such:


SIP TRUNK SIP TRUNK
CLIENTS SIP PABX ===========> FREEPBX ===> A2BILLING==========>SIP WHOLESALE PROVIDER

I have created a customer in a2billing and have associated all his caller ids with the customer account and have configured a2billing to not answer the call during this flow. I have also configured a callplan, tarrif table, rate card, trunk with the wholesale provider and rates. This all works perfectly when using the custom dial string in custom trunk with a specific number instead of variable $OUTNUM$ i.e. Local/24000010@custom-a2billing/n instead of Local/$OUTNUM$@custom-a2billing/n . It seems that $OUTNUM$ is not recognised for some reason.

Please let me know if you need any further information and once again thank you!


Top
 Profile  
 
 Post subject: Re: $OUTNUM$ variable not showing called number
PostPosted: Thu Mar 06, 2014 9:01 pm 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
I still don't think you want to be trying to feed the call through FreePBX.

Here's a walkthrough - http://sysadminman.net/blog/2011/a2b100 ... lling-3127

The only real difference would be that you want to change the CONTEXT for the SIP customer details to custom-a2billing

If you did want to use caller ID authentication then on the agi-conf you are using you can turn on using caller ID for authentication.

However, you should be clear you understand the risk of doing this. With no other security, anyone that found out that caller ID would be able to fire calls through your system.

Probably better to use IP authentication if possible - http://sysadminman.net/blog/2012/ip-aut ... g-sip-4205


Top
 Profile  
 
 Post subject: Re: $OUTNUM$ variable not showing called number
PostPosted: Fri Mar 07, 2014 8:19 pm 
Offline

Joined: Thu Mar 06, 2014 10:03 am
Posts: 6
Ok it works now! Thank you so much for your help! Really appreciate it!


Top
 Profile  
 
 Post subject: Re: $OUTNUM$ variable not showing called number
PostPosted: Sat Mar 08, 2014 9:21 am 
Offline

Joined: Mon Mar 02, 2009 8:56 pm
Posts: 271
No problem. Good news. Thanks for the update.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 
Auto Dialer Software


All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 25 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group