Lede 17.01 rc2 - asterisk13 - with Sipgate how to config ? VGV7510KW22 / o2 6431

Hello,
i build a Image v17.01 rc2 for my VGV7510KW22 with the Patch from Stefan Koch
(o26431-vmmc_v3.tar.gz)

https://drive.google.com/file/d/0B9Z_KppE2R8sMjhVSHRXWElLdE0/view?usp=sharing

Now i got a dial-tone, but can not call a telefonnumber.

What did i wrong ?

here are the Logfiles & Config Files: https://www.file-upload.net/download-12305299/asterisk.zip.html

Thanks

look inside the asterisk console:

asterisk -r

and analyse what is goin wrong

It describe in the same thread read from here: https://forum.openwrt.org/viewtopic.php?pid=311920#p311920

here a parts from my modified config i hope it will work
I am direct connected to the Internet.

/etc/asterisk/extensions.conf

[globals]
FXS1_SNUM=21
FXS2_SNUM=22



[default]
; emty for security reasons



[foreign_in]
exten => _[+0-9A-Za-z].,1,NoOp(Foreign in Call from: ${CALLERID(all)})
exten => _3XX,2,Gosub(intern,${EXTEN},1)
exten => USERID_SG,2,Gosub(intern,300,1)
exten => USERID_FVD,2,Gosub(intern,300,1)
exten => _X!,2,NoOp(Wrong exten: ${EXTEN})
exten => _[+0-9A-Za-z].,n,Hangup
; this is your default context (see sip.conf: context=foreign_in ) all calls from foreign came here, be shure that you can NEVER NEVER NEVER dial out !
; only right extension will be handle here, usefull because crimminals try to telefon with your device, if each call goes to intern your telefon will ring non stop.
;
;
;
[foreign_out]
exten => _90.,1,Gosub(sipgatede,${EXTEN:2},1)            ; if want to use this provider with an exact number (90 will delete)
exten => _91.,1,Gosub(freevoipdealcom,${EXTEN:2},1)
exten => _0X.,1,Gosub(freevoipdealcom,+49${EXTEN:1},1)        ; country intern default (0 will replace by +49)
exten => _[+0-9A-Za-z].,n,Hangup
;
;
;
[all]
exten => _3XX,1,Gosub(intern,${EXTEN},1)
exten => _[09]X.,1,Gosub(foreign_out,${EXTEN},1)
exten => _[+0-9A-Za-z].,n,Hangup
;
;
;
[intern]
exten => 300,1,Dial(local/s@ltq1_in/n&local/s@ltq2_in/n&SIP/311)    ; all, the both tapi device and the sip account ringing, the first pick up get the call
exten => 301,1,Goto(tel1_in,s,1)
exten => 302,1,Goto(tel2_in,s,1)
exten => _31X,1,Dial(SIP/${EXTEN})
exten => _[+0-9A-Za-z].,n,Hangup
exten => _[+0-9A-Za-z].,n,Return()
;
;
;
; ##############################################################
;
; draufsicht auf die Rückseite
; o2Box-6431
; ------------------------------
; |                 |
; |                |
; |                |
; |  n f u            |
; |  | | |              |
; |    1 2            |
; -------------------------------
[tel1_out]
exten => _X.,1,Set(CALLERID(num)=${FXS1_NUM})
exten => ${FXS2_SNUM},2,Goto(ltq2_in,s,1)        ; direct call by dialing 22 from TAPI 1 to 2
exten => _X!,2,Gosub(all,${EXTEN},1)
;
[tel2_out]
exten => _X.,1,Set(CALLERID(num)=${FXS1_NUM})
exten => ${FXS1_SNUM},2,Goto(ltq1_in,s,1)        ; direct call by dialing 21 from TAPI 2 to 1
exten => _X!,2,Gosub(all,${EXTEN},1)
;
;
;
[ltq1_out]
exten => _X!,1,Dial(local/${EXTEN}@tel1_out/n)
;
[ltq2_out]
exten => _X!,1,Dial(local/${EXTEN}@tel2_out/n)
;
;
;
;
[tel1_in]
exten => s,1,Dial(local/s@ltq1_in/n)
exten => s,2,Hangup
;
[tel2_in]
exten => s,1,Dial(local/s@ltq2_in/n)
exten => s,2,Hangup
;
;
;
;
[ltq1_in]
exten => s,1,Dial(TAPI/1,60,t)
exten => s,2,Hangup
;
[ltq2_in]
exten => s,1,Dial(TAPI/2,60,t)
exten => s,2,Hangup
;
;
;
;
[lantiq1]
include => ltq1_out
;
[lantiq2]
include => ltq2_out 
;

/etc/asterisk/sip.conf

[general]
context=foreign_in                     ; Default context for incoming calls. Defaults to 'default'
allowoverlap=yes                     ; Disable overlap dialing support. (Default is yes)
; udpbindaddr=[::]:5060
udpbindaddr=0.0.0.0:5060
tcpenable=no                        ; Enable server for incoming TCP connections (default is no)
transport=udp                       ; Set the default transports.  The order determines the primary default transport.
srvlookup=yes      
subscribe_network_change_event=yes
nat=force_rport,comedia
;
;
;
register => USERID_SG:PASS_SG@sipgate.de:5060/USERID_SG
register => USERID_FVD:PASS_FVD@sip.freevoipdeal.com:5060/USERID_FVD
;
;
;
[sipgatede]
context=foreign_in
type=peer
host=sipgate.de
port=5060
fromdomain=sipgate.de
insecure=port,invite
;
dtmfmode=rfc2833
disallow=all
allow=gsm,alaw,ulaw
;
defaultuser=USERID_SG
fromuser=USERID_SG
secret=PASS_SG
callerid=TELNUM_SG
;
;
;
[freevoipdealcom]
context=foreign_in
type=peer
host=sip.freevoipdeal.com
port=5060
fromdomain=sip.freevoipdeal.com
insecure=port,invite
;
dtmfmode=rfc2833
disallow=all
allow=gsm,alaw,ulaw
;
defaultuser=USERID_FVD
fromuser=USERID_FVD
secret=PASS_FVD
;
;
;
;
[311]
callerid=311
context=all
type=friend
host=dynamic
defaultuser=311
secret=secretpass-for-311
;
videosupport=yes
allow=ulaw,alaw
;
deny=0.0.0.0/0.0.0.0        ; only allow from LAN
permit=192.168.0.0/16
permit=172.16.0.0/12
permit=10.0.0.0/8
;

/etc/asterisk/rtp.conf

[general]
rtpstart=15000
rtpend=16000
; define the portrange where the rtp will be used

/etc/asterisk/lantiq.conf

[interfaces]
;
; Number of FXS ports (default: 2)
channels = 2
per_channel_context = on

I can not garantee that this config will work, for any damage or cost that this description produce I do not take responsibility.
Please be really carefull, if it is possible to call from the default context (in this example [foreign_in]) to extern it can cost thousends of Money.
Because crimminals try to telefon over your maschine.
If you think it will not happens on you: It happens on me when i do my first experiments with Asterisk.
What a luck that the rest of my extensions.conf was a fail to.
1 - first experiments should only be do via prepaid account with full cost controll.
2 - read the-asterisk-book and understand the part with the extentions
3 - be shure that nobody can dial out from the default context !!!!
4 - permit SIP-accounts that will be used from LAN only, the rechability from LAN only
deny=0.0.0.0/0.0.0.0 ; only allow from LAN
permit=192.168.0.0/16
permit=172.16.0.0/12
permit=10.0.0.0/8
5 - use Long and complex passwords

If you are German you can read what happen If my advice is not followed.

1 Like

in some constallations it is possible that the dial out fail: cause 20 subscriber absend

read this: https://forum.openwrt.org/viewtopic.php?id=69371

I solve this for me via:
/etc/hotplug.d/iface/90-asterisk-restart

#!/bin/sh

if test "$ACTION" == "ifup" || test "$ACTION" == "ifdown" ; then
    case $DEVICE in
        pppoe-wan) /etc/init.d/asterisk enabled && /etc/init.d/asterisk restart ;;
    esac
fi

but this solution is very rustical

1 Like