Serveur vocal d'accueil / welcoming server

Hi,

I’d like to configure a vocal server but it only work from internal phone.
I must have missed a configuration somewhere.
When I call 6100 from internal phone directly with the extension I get the message from the server and when I type an other extension at the end of the call I succeed to reach an other phone.
But when I call from external phone I get the message from the server but impossible to reach a phone with its extension it hangup directly at the end of the message from the server vocal.

Here is my extension.conf :

[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
[globals]
CONSOLE=Console/dsp ; Console interface for demo
IAXINFO=guest ; IAXtel username/password
TRUNK=Zap/g2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)

[nimi]
include => parkedcalls
exten => 6100,1,Answer()
exten => 6100,2,Set(TIMEOUT(response)=10)
exten => 6100,n,WaitExten()
exten => 6100,3,Playback(/var/lib/asterisk/sounds/fr/NimiExtCustom01)
exten => 6100,n,WaitExten()
exten => _6XXX,n,Dial(SIP/${EXTEN},20)
exten => 6100,n,Dial(SIP/6000&SIP/6034&SIP/6004,12,tkTK)
exten => 6100,n,Hangup()

exten => 6200,1,Answer()
exten => 6200,n,Dial(SIP/6007,5,tkTK)
exten => 6200,n,Dial(SIP/6003&SIP/6007,30,tkTK)
exten => 6200,n,Hangup()

exten => 6033,1,Dial(SIP/6033&SIP/6050,60,tkTK)
exten => 6033,n,Hangup()
exten => _60XX,1,Dial(SIP/${EXTEN},60,tkTK)
exten => _60XX,n,Hangup()
exten => _[012345789].,1,Set(CALLERID(all)=“Nimi” <0033562922381>)

exten => _[012345789].,n,PlayBack(/var/lib/asterisk/sounds/fr/silence/1)
exten => _[012345789].,n,Dial(SIP/${EXTEN}@forfait-ovh,180,tkTK)
exten => _[012345789].,n,Hangup()

[macro-fromexter]
exten => s,1,Answer()
exten => s,n,Set(TIMEOUT(response)=20)
exten => s,n,Playback(/var/lib/asterisk/sounds/fr/NimiExtCustom01)
exten => s,n,WaitExten()
exten => _6XXX,n,Dial(SIP/${EXTEN},20)
exten => s,n,Wait(1)
exten => s,n,Dial(SIP/6100,12,tkTK)
exten => s,n,Dial(SIP/6000&SIP/6034&SIP/6004,12,tkTK)
exten => s,n,Dial(SIP/6035,5,tkTK)
exten => s,n,Dial(SIP/6034&SIP/6004,60,tkTK)
exten => s,n,Hangup()

[ovh-sip]
exten => 0033972470892,1,Macro(fromexter)
exten => 0972470892,1,Macro(fromexter)
exten => 0033562922381,1,Macro(fromexter)
exten => 0562922381,1,Macro(fromexter)
exten => 0033972563452,1,Macro(fromexteradmise)
exten => 0972563452,1,Macro(fromexteradmise)

here is part of the sip.conf:

[general]
context=default
language=fr
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
canreinvite=no
defaultexpiry=1800
registertimeout=30
registerattempts=0
disallow=all
;allow=ulaw
allow=alaw
;allow=g722
allowguest=yes
nat=force_rport,comedia
callcounter=yes

register => 0033972470891:p
register => 0033972563451:p

[forfait-ovh]
type=friend
host=sip.ovh.fr
fromdomain=sip.ovh.fr
context=ovh-sip
language=fr
insecure=invite,port
username=0033972470891
fromuser=0033972470891
secret=pwd
nat=force_rport,comedia
qualify=yes
dtmfmode=rfc2833
;disallow=all
;allow=ulaw
;allow=alaw
;allow=g722
canreinvite=no
video=no
restrictcid=no
amaflags=default
call-limit=4

If anyone have an idea of the parameters to look into, it would be great.

Kindly
Pierre

There is no way of reaching context mimi!

There are two priority 3’s in 6100@mimi.

canreinvite is deprecated (use directmedia).

Making port insecure is usually the result of copying and pasting, rather than a desirable option.

In practice, the pattern match _6XXX, in mimi, is only going to ever match 6100, as the preceding priority will only ever be reached with that extension.

The _6XXX in fromexter isn’t going to match anything, as the extension can only be s on the preceding priority. As such, the dialplan will end after WaitExten. I think you are assuming that WaitExten doesn’t reset the priority. You also seem to be making wrong assumptions about how priority n works (it increments independently of the extension).

Macros are deprecated. I’m not sure if MACROEXTEN is the one running in the macro, in which case it won’t be set by WaitExten, or the one saved from when the macro was called, in which case it should work.

nimi context is just for test purpose and I dial 6100 with internal call to reach this context.
Ok I’ll sort out the _6XXX and the MACROEXTEN and insecure other parameters
by the way I use Asterisk 13.1-cert2

Thanks a million,

Pierre

MACROEXTEN I’m not sure about as I haven’t used macros since they were deprecated, over half a decade ago!

Hi,
I used directmedia instead of canreinvite

Insecure seam to be correct according to this documentation:
https://www.voip-info.org/wiki/view/Asterisk+config+sip.conf

insecure=port do not take into account the port number
insecure=invite accept invite without register (for static host)

Should I use only insecure=invite or remove it completely?

Going back to the welcoming server for typing extension:
I tried:
exten => s,n,Dial(SIP/${EXTEN},20)
but it directly call the first number entered or 2 numbers if I type them quickly, but not the 4 figures of the extension.
Should I add a wait(1) between WaitExten() and the Dial ?

Kind regards

Hi,
I had the following warning:
Invalid extension but no rule ‘i’ or ‘e’ in context ‘ovh-sip’

I added the followind line in ‘ovh-sip’ at the very end of extension.conf
exten => _60XX,1,Dial(SIP/${EXTEN},60,tkTK)

Main problem is now solved!

The only problem I have but is not mandatory is : in case of wrong number it hangup.

Thanks for your help

insecure removes security checks, so you should only disable those you need to disable. If your ITSP always originates from port 5060, don’t disable insecure=port.