-
facturation des clients sip du même serveur asterisk
Bonjour à tous
je viens tout juste de m'initier sur asterisk et c'est à partir des tutoriels sur l'etoile que j'ai pu accumiler certaine connaissance sur ce domaine.
j'ai installé asterisk 1.8.13 et a2billing v2.0.7 sur un serveur sparc64 sunv240, et j'ai déjà créé des clients sip qui s'appellent correctement sans facturation. Ma question est la suivante: quelle configuration dois-je faire entre asterisk et a2billing pour que deux clients sip enregistrés sur le même serveur qui s'appellent soient facturé?.
j'ai lu sur les tuto et j'arrive à faire les configurations suivantes mais ça marche pas, j'ai besoin de votre aides svp:
-sur le fichier /etc/asterisk/extensions_a2billing.conf
[a2billing]
exten => _1xxx,1,Dial(Local/${EXTEN}@a2billing_callingcad/n,60,gr); pour similation d'un trunk local
[a2billing]
include => a2billing_callingcard
include => a2billing_monitoring
include => a2billing_voucher
include => a2billing
include => a2billing_saydid
include => a2billing_echotest
[a2billing_callingcard]
; CallingCard application
exten => _1XXX,1,NoOp(A2Billing Start)
exten => _1XXX,n,Wait(1)
exten => _1XXX,n,AGI(a2billing.php,1)
exten => _1XXX,n,Hangup
.
.
.
-
-sur le fichier /etc/asterisk/sip.conf
[1003]
type=friend
username=1003
secret=1003
host=dynamic
callerid="Djoumbe1"
language=fr
context=a2billing
disallow=all
allow=ulaw
allow=alaw
allow=gsm
dtmfmode = rfc2833
allow=h264
allow=h263
[1001]
type=friend
username=1001
secret=1001
host=dynamic
callerid="prive"
language=fr
context=a2billing
disallow=all
allow=ulaw
allow=alaw
allow=gsm
dtmfmode = rfc2833
allow=h264
allow=h263
-Dans a2billing j'ai créé:
1-provider: internal
2-trunk: vers-trunk-local
TECH:local
IP/HOST:a2billing
PROVIDER:internal
3-ratecard: local-sip-ratecad
TRUNK: vers-trunk-loca
4-rates:
j'ai mis le tarif, le trunk et le ratecard
5- dans customers j'ai crée des account numbers
j'ai lié le callid 1003 avec un account number.
voici les messages d'erreur:
-- Executing [1003@a2billing:1] Dial("SIP/1001-00000018", "Local/1003@a2billing_callingcad/n,60,gr") in new stack
[Apr 2 19:31:11] NOTICE[20106]: chan_local.c:899 local_call: No such extension/context 1003@a2billing_callingcad while calling Local channel
-- Couldn't call Local/1003@a2billing_callingcad/n
== Everyone is busy/congested at this time (0:0/0/0)
-- Executing [1003@a2billing:2] Wait("SIP/1001-00000018", "1") in new stack
-- Executing [1003@a2billing:3] AGI("SIP/1001-00000018", "a2billing.php,1") in new stack
-- Launched AGI Script /usr/share/asterisk/agi-bin/a2billing.php
-- <SIP/1001-00000018> Playing 'prepaid-enter-pin-number.gsm' (language 'fr')
-- Playing 'prepaid-no-card-entered' (escape_digits=#) (sample_offset 0)
-- <SIP/1001-00000018> Playing 'prepaid-enter-pin-number.gsm' (language 'fr')
-- Playing 'prepaid-no-card-entered' (escape_digits=#) (sample_offset 0)
-- <SIP/1001-00000018> Playing 'prepaid-enter-pin-number.gsm' (language 'fr')
-- <SIP/1001-00000018>AGI Script a2billing.php completed, returning 4
== Spawn extension (a2billing, 1003, 3) exited non-zero on 'SIP/1001-00000018'
== Using SIP RTP CoS mark 5
-- Executing [1001@a2billing:1] Dial("SIP/1003-00000019", "Local/1001@a2billing_callingcad/n,60,gr") in new stack
[Apr 2 19:31:58] NOTICE[20109]: chan_local.c:899 local_call: No such extension/context 1001@a2billing_callingcad while calling Local channel
-- Couldn't call Local/1001@a2billing_callingcad/n
== Everyone is busy/congested at this time (0:0/0/0)
-- Executing [1001@a2billing:2] Wait("SIP/1003-00000019", "1") in new stack
-- Executing [1001@a2billing:3] AGI("SIP/1003-00000019", "a2billing.php,1") in new stack
-- Launched AGI Script /usr/share/asterisk/agi-bin/a2billing.php
-- <SIP/1003-00000019> Playing 'prepaid-enter-pin-number.gsm' (language 'fr')
[Apr 2 19:32:03] NOTICE[17222]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1001
-- Playing 'prepaid-no-card-entered' (escape_digits=#) (sample_offset 0)
-- <SIP/1003-00000019> Playing 'prepaid-enter-pin-number.gsm' (language 'fr')
-- Playing 'prepaid-no-card-entered' (escape_digits=#) (sample_offset 0)
-- <SIP/1003-00000019> Playing 'prepaid-enter-pin-number.gsm' (language 'fr')
-- <SIP/1003-00000019>AGI Script a2billing.php completed, returning 4
== Spawn extension (a2billing, 1001, 3) exited non-zero on 'SIP/1003-00000019'
Labo-sunV240*CLI>
root@Labo-sunV240:~# tail -f /var/log/a2billing/a2billing_agi.log
]
[02/04/2014 19:31:44]:[CallerID:1001]:[CN:]:[[exit]]
[02/04/2014 19:31:59]:[file:a2billing.php - line:117 - uniqueid:]:[CallerID:]:[CN:]:[IDCONFIG : 1]
[02/04/2014 19:31:59]:[file:a2billing.php - line:118 - uniqueid:]:[CallerID:]:[CN:]:[MODE : standard]
[02/04/2014 19:31:59]:[file:Class.A2Billing.php - line:712 - uniqueid:1396456318.725]:[CallerID:1003]:[CN:]:[ get_agi_request_parameter = 1003 ; SIP/1003-00000019 ; 1396456318.725 ; ; 1001]
[02/04/2014 19:31:59]:[file:a2billing.php - line:165 - uniqueid:1396456318.725]:[CallerID:1003]:[CN:]:[[ANSWER CALL]]
[02/04/2014 19:32:31]:[file:a2billing.php - line:613 - uniqueid:1396456318.725]:[CallerID:1003]:[CN:]:[[NO AUTH (CN:, cia_res:-1, CREDIT
]]
[02/04/2014 19:32:31]:[file:Class.A2Billing.php - line:246 - uniqueid:1396456318.725]:[CallerID:1003]:[CN:]:[HANGUP DETECTED!
]
[02/04/2014 19:32:31]:[CallerID:1003]:[CN:]:[[exit]]
[02/04/2014 19:34:39]:[file:a2billing.php - line:117 - uniqueid:]:[CallerID:]:[CN:]:[IDCONFIG : 1]
[02/04/2014 19:34:39]:[file:a2billing.php - line:118 - uniqueid:]:[CallerID:]:[CN:]:[MODE : standard]
[02/04/2014 19:34:39]:[file:Class.A2Billing.php - line:712 - uniqueid:1396456478.728]:[CallerID:1003]:[CN:]:[ get_agi_request_parameter = 1003 ; SIP/1003-0000001a ; 1396456478.728 ; ; 1001]
[02/04/2014 19:34:39]:[file:a2billing.php - line:165 - uniqueid:1396456478.728]:[CallerID:1003]:[CN:]:[[ANSWER CALL]]
[02/04/2014 19:35:11]:[file:a2billing.php - line:613 - uniqueid:1396456478.728]:[CallerID:1003]:[CN:]:[[NO AUTH (CN:, cia_res:-1, CREDIT
]]
[02/04/2014 19:35:11]:[file:Class.A2Billing.php - line:246 - uniqueid:1396456478.728]:[CallerID:1003]:[CN:]:[HANGUP DETECTED!
]
[02/04/2014 19:35:11]:[CallerID:1003]:[CN:]:[[exit]]
Si j'effectue un appel et j'entre un des numeros que j'ai créé dans customer j'obtiens ceci:
-- Executing [1003@a2billing:1] Dial("SIP/1001-0000001b", "Local/1003@a2billing_callingcad/n,60,gr") in new stack
[Apr 2 19:36:26] NOTICE[20120]: chan_local.c:899 local_call: No such extension/context 1003@a2billing_callingcad while calling Local channel
-- Couldn't call Local/1003@a2billing_callingcad/n
== Everyone is busy/congested at this time (0:0/0/0)
-- Executing [1003@a2billing:2] Wait("SIP/1001-0000001b", "1") in new stack
-- Executing [1003@a2billing:3] AGI("SIP/1001-0000001b", "a2billing.php,1") in new stack
-- Launched AGI Script /usr/share/asterisk/agi-bin/a2billing.php
-- <SIP/1001-0000001b> Playing 'prepaid-enter-pin-number.gsm' (language 'fr')
-- Playing 'prepaid-you-have' (escape_digits=#) (sample_offset 0)
-- <SIP/1001-0000001b> Playing 'digits/8.slin' (language 'fr')
-- <SIP/1001-0000001b> Playing 'digits/hundred.slin' (language 'fr')
-- <SIP/1001-0000001b> Playing 'digits/20.slin' (language 'fr')
-- <SIP/1001-0000001b> Playing 'digits/6.slin' (language 'fr')
-- <SIP/1001-0000001b> Playing 'digits/thousand.slin' (language 'fr')
-- <SIP/1001-0000001b> Playing 'digits/4.slin' (language 'fr')
-- <SIP/1001-0000001b> Playing 'digits/hundred.slin' (language 'fr')
-- <SIP/1001-0000001b> Playing 'digits/40.slin' (language 'fr')
-- <SIP/1001-0000001b> Playing 'digits/6.slin' (language 'fr')
-- Playing 'credit' (escape_digits=#) (sample_offset 0)
-- Playing 'vm-and' (escape_digits=#) (sample_offset 0)
-- <SIP/1001-0000001b> Playing 'digits/20.slin' (language 'fr')
-- <SIP/1001-0000001b> Playing 'digits/8.slin' (language 'fr')
-- Playing 'prepaid-cents' (escape_digits=#) (sample_offset 0)
-- <SIP/1001-0000001b> Playing 'prepaid-sipiax-press9.gsm' (language 'fr')
-- <SIP/1001-0000001b> Playing 'prepaid-enter-dest.gsm' (language 'fr')
-- <SIP/1001-0000001b> Playing 'prepaid-sipiax-press9.gsm' (language 'fr')
-- <SIP/1001-0000001b> Playing 'prepaid-sipiax-enternumber.gsm' (language 'fr')
-- Playing 'prepaid-sipiax-num-nomatch' (escape_digits=#) (sample_offset 0)
-- <SIP/1001-0000001b> Playing 'prepaid-sipiax-press9.gsm' (language 'fr')
-- <SIP/1001-0000001b> Playing 'prepaid-enter-dest.gsm' (language 'fr')
[Apr 2 19:38:03] NOTICE[17222]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1001
-- Playing 'prepaid-dest-unreachable' (escape_digits=#) (sample_offset 0)
-- <SIP/1001-0000001b>AGI Script a2billing.php completed, returning 4
== Spawn extension (a2billing, 1003, 3) exited non-zero on 'SIP/1001-0000001b'
Labo-sunV240*CLI>
meci de votre aide
Règles de messages
- Vous ne pouvez pas créer de nouvelles discussions
- Vous ne pouvez pas envoyer des réponses
- Vous ne pouvez pas envoyer des pièces jointes
- Vous ne pouvez pas modifier vos messages
-
Règles du forum