Hi everyone!
My first post, please bear with me…
I’m a bit clueless to where to go from here.
Here is what I’m trying to do:
Getting PSTN calls through to the Asterisk server (via my DID numbers from didlogic). E.g I’m trying to call my Finnish Number 358-323233232-2 which I got from DIDlogic, and I’ve setup the number in a2billing with DID destination to the SIP/asterisk-client-nr.
I’ve opened all ports in my router (from 1-65000 TCP and UDP) to my server, so I’m not sure where to look anymore. IPTables is cleared on the Asterisk Server for now. Been trying to figure this out now for the last week, with tweaking the config files up and down, not sure what is right or wrong anymore.
Here is what I’m running:
Operation System Version : Ubuntu 12.04.2 LTS
Asterisk Version : 1.8
PHP Version : 5.3.10-1ubuntu3.5
A2Billing Version : 2.0.1
The Asterisk server has IP: 192.168.1.101
ISP public IP: Dynamic.
Router: Zyxel CheapCheap-Router/Switch
Here are my config files:
sip.conf:
[general]
register => XXXXX:XXXX@sip.didlogic.net
bindport=5060
bindaddr=0.0.0.0
context=a2billing
;allowoverlap=no
rtcachefriend=yes
disallow=all
allow=ulaw
allow=gsm
allow=g711
dtmfmode=rf2833
progressinband=never
srvlookup=no
insecure=port,invite
nat=yes
externip=voip.mydomain.com
localnet=192.168.0.0/255.255.0.0
host=dynamic
qualify=yes
canreinvite=no
[siptrunk]
host=sip.didlogic.net
type=peer
insecure=port,invite
nat=yes
username=XXXXXX
secret=XXXXX
sendrpid=yes
canreinvite=no
context=a2billing
allow=ulaw,gsm,g711
host=dynamic
qualify=yes
extensions.conf:
[general]
static=yes
writeprotect=no
clearglobalvars=no
[a2billing]
switch => Realtime
extconfig.conf:
[settings]
sipusers => mysql,asterisk_database_name,cc_sip_buddies
sippeers => mysql,asterisk_database_name,cc_sip_buddies
voicemail => mysql,asterisk_database_name,voicemail
extensions => mysql,asterisk_database_name,extensions
‘extensions’ from ‘asterisk_database_name’:
±---------±-------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±---------±-------------±-----±----±--------±---------------+
| id | int(11) | NO | MUL | NULL | auto_increment |
| context | varchar(20) | NO | PRI | | |
| exten | varchar(20) | NO | PRI | | |
| priority | tinyint(4) | NO | PRI | 0 | |
| app | varchar(20) | NO | | | |
| appdata | varchar(128) | NO | | | |
±---------±-------------±-----±----±--------±---------------+
mysql> select * from extensions;
±—±----------±------±---------±-------±----------------+
| id | context | exten | priority | app | appdata |
±—±----------±------±---------±-------±----------------+
| 1 | a2billing | _X. | 1 | NoOp | A2Billing Start |
| 2 | a2billing | _X. | 2 | AGI | a2billing.php,1 |
| 3 | a2billing | _X. | 3 | Hangup | |
±—±----------±------±---------±-------±----------------+
res_config_mysql.conf:
[asterisk_xxxxx]
dbhost = 127.0.0.1
dbname = asterisk_database_name
dbuser = asterisk_database_user_name
dbpass = asterisk_database_password
dbport = 3306
dbsock = /tmp/mysql.sock
modules.conf:
[modules]
autoload=yes
load => res_config_mysql.so
load => app_realtime.so
load => func_realtime.so
load => pbx_realtime.so
Here is the error I get:
== Using SIP RTP CoS mark 5
– Executing [DID_NUMBER_I_CALLED@a2billing:1] NoOp(“SIP/9413927163-0000001f”, “A2Billing Start”)
– Executing [DID_NUMBER_I_CALLED@a2billing:2] AGI(“SIP/9413927163-0000001f”, “a2billing.php,1”)
– Launched AGI Script /usr/share/asterisk/agi-bin/a2billing.php
– AGI Script Executing Application: (DIAL) Options: (SIP/9413927163,60,HiL(3600000:61000:30000))
> Limit Data for this call:
> timelimit = 3600000 ms (3600.000 s)
> play_warning = 61000 ms (61.000 s)
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 30000 ms (30.000 s)
> start_sound =
> warning_sound = timeleft
> end_sound =
== Using SIP RTP CoS mark 5
[Mar 3 10:36:20] WARNING[11305]: chan_sip.c:3370 __sip_xmit: sip_xmit of 0x7f2e5c00d180 (len 986) to 0.0.0.123:5060 returned -1: Invalid argument
– Called SIP/9413927163
[Mar 3 10:36:20] WARNING[6764]: chan_sip.c:3370 __sip_xmit: sip_xmit of 0x7f2e5c00d180 (len 986) to 0.0.0.123:5060 returned -1: Invalid argument
– <SIP/9413927163-0000001f>AGI Script a2billing.php completed, returning 4
== Spawn extension (a2billing, 4721984121, 2) exited non-zero on ‘SIP/9413927163-0000001f’
[Mar 3 10:36:21] WARNING[6764]: chan_sip.c:3370 __sip_xmit: sip_xmit of 0x7f2e5c00d180 (len 986) to 0.0.0.123:5060 returned -1: Invalid argument
[Mar 3 10:36:23] WARNING[6764]: chan_sip.c:3370 __sip_xmit: sip_xmit of 0x7f2e5c00d180 (len 986) to 0.0.0.123:5060 returned -1: Invalid argument
Any help is much appreciated!
Thanks guys.