Dialplan config error - cant park calls


#1

I am attempting to enable call parking (and hopefully call forwarding using MMI codes). I modified my extensions, features and sip.config files. But i do not believe I have the extensions or sip configured properly.

Phones can make calls, but i don’t think i have them authorized to use call parking correctly in the extensions file. These are mobiles not SIP phones.

Can anyone help me with understanding what I am doing wrong with my configuration?

features.conf

[general]
parkext =>700
parkpos => 701-720
context => parkedcalls

[featuremap]
blindxfer => #1
atxfer => *2
parkcall => #72

root@ubuntu:/etc/asterisk# cat extensions.conf
[globals]
include => parkedcalls

[default]
; This is the context for handsets that are allowed to attached via open registration.
; Normally, this context is only used for testing.

; These are test extensions that you might want to disable after installation.

; Create an extension, 2600, for evaluating echo latency.
exten => 2600,1,Answer() ; Do the echo test
exten => 2600,n,Echo ; Do the echo test
exten => 2600,n,Hangup()

; The 2101 extension is used for factory testing with zoiper.
exten => 2101,1,Dial(SIP/zoiper)

[outbound-trunk]
; If you had an external trunk, you would dial it here.
;exten => _N.,1,Answer()

exten => _1NXXNXXXXXX,1,Dial(SIP/call-out/{EXTEN}) exten => _NXXNXXXXXX,1,Dial(SIP/call-out/{EXTEN})
exten => _[12]000.,1,Dial(SIP/call-out/${EXTEN})

[phones]
; This is the context for handsets provisioned through the realtime database.
; This assumes that OpenBTS units all are running their SIP interfaces on port 5062.
;include => outbound-trunk

include => OpenBTS
exten => _N.,1,Set(Name={ODBC_SQL(select dial from dialdata_table where exten = \"{EXTEN}")})
exten => _N.,n,GotoIf(["{Name}" = “”] ?sip-external,{EXTEN},1) exten => _N.,n,Set(IPAddr={ODBC_SQL(select ipaddr from sip_buddies where name = “{Name}\")}) exten => _N.,n,GotoIf([”{IPAddr}" = ""] ?sip-external,{EXTEN},1)
exten => _N.,n,Dial(SIP/{Name}@{IPAddr}:5062)

;this should allow call forwarding using 21
;and end call forwarding using #21#
exten => _21X.,1,DBPut(CFIM/{CALLERIDNUM}={EXTEN:4})
exten => _21X.,2,Hangup
exten => #21#,1,DBdel(CFIM/{CALLERIDNUM}={EXTEN:4})
exten => #21#,2,Hangup

sip.conf

[general]
bindport=5060
bindaddr=0.0.0.0
udpbindaddr=0.0.0.0

tos_sip=cs3 ; Sets TOS for SIP packets.
tos_audio=ef ; Sets TOS for RTP audio packets.
tos_video=af41 ; Sets TOS for RTP video packets.
tos_text=af41 ; Sets TOS for RTP text packets.

cos_sip=3 ; Sets 802.1p priority for SIP packets.
cos_audio=5 ; Sets 802.1p priority for RTP audio packets.
cos_video=4 ; Sets 802.1p priority for RTP video packets.
cos_text=3 ; Sets 802.1p priority for RTP text packets.

maxexpiry=3600 ; Maximum allowed time of incoming registrations
; and subscriptions (seconds)
minexpiry=60 ; Minimum length of registrations/subscriptions (default 60)
defaultexpiry=3600 ; Default length of incoming/outgoing registration
dynamic_exclude_static=yes
use_q850_reason=yes ; Set to yes add Reason header and use Reason header if it is available.

rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP activity
; on the audio channel
; when we’re not on hold. This is to be able to hangup
; a call in the case of a phone disappearing from the net,
; like a powerloss or grandma tripping over a cable.
rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTCP activity
; on the audio channel
; when we’re on hold (must be > rtptimeout)

autocreatepeer=yes ; The Autocreatepeer option allows,
; if set to Yes, any SIP ua to register with your Asterisk PBX as a peer.
; This peer’s settings will be based on global options.
; The peer’s name will be based on the user part of the Contact: header field’s URL.

context=phones ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)

disallow=all ; need to disallow=all before we can use allow=
allow=ulaw ; GSM
allow=gsm ; ISDN US
allow=alaw ; ISDN EU

;relaxdtmf=yes ; Relax dtmf handling
;dtmfmode=auto
dtmfmode=rfc2833

[sip-local]
; This context is the union of all of the in-network contexts.
include => default
include => phones
include => parkedcalls

[sip-external]
; This is the top-level context that gives access to out-of-network calling.
; also includes the in-network calling.
include => default
include => outbound-trunk

; Zoiper is used as a fixture for factory testing.
[zoiper]
secret=3078923984
callerid=2101
canreinvite=no
type=friend
context=sip-local
host=dynamic
dtmfmode=auto

[call-out]
canreinvite=no
type=friend
context=users
host=192.168.v.v

[IMSIYYYYYYYYYYYYYYY]
canreinvite=no
type=friend
context=phones
allow=gsm
host=192.168.v.v
cid_number=XXXXXXXXXX

[IMSIYYYYYYYYYYYYYYY]
canreinvite=no
type=friend
context=phones
allow=gsm
host=192.168.v.v
cid_number=XXXXXXXXXX

[IMSIYYYYYYYYYYYYYYY]
canreinvite=no
type=friend
context=phones
allow=gsm
host=192.168.v.v
cid_number=XXXXXXXXXX

[IMSIYYYYYYYYYYYYYYY]
canreinvite=no
type=friend
context=phones
allow=gsm
host=192.168.v.v
cid_number=XXXXXXXXXX

[IMSIYYYYYYYYYYYYYYY]
canreinvite=no
type=friends
context=phones
allow=gsm
host=192.168.v.v
cid_number=XXXXXXXXXX

[IMSIYYYYYYYYYYYYYYY]
canreinvite=no
type=friends
context=phones
allow=gsm
host=192.168.v.v
cid_number=XXXXXXXXXX

[IMSIYYYYYYYYYYYYYYY]
canreinvite=no
type=friends
context=phones
allow=gsm
host=192.168.v.v
cid_number=XXXXXXXXXX

[IMSIYYYYYYYYYYYYYYY]
canreinvite=no
type=friends
context=phones
allow=gsm
host=192.168.v.v
cid_number=XXXXXXXXXX


#2

#72 does nothing. I dont think i have DTFM assigned to phones, but since these are mobiles I dont understand how to give them permission through extensions.conf

I understand the user needs to be given permission with dial t and T, but don’t understand how to assign permission properly.

Also, asterisk 1.8


#3

parkedcalls should be included in the context or contexts where the numbers can actually be dialled, not in globals.

No DTMF features are enabled in any of your Dial application calls.

The mobile phone air interface sends DTMF out of band and regenerates it in the base station (the GSM codec is incapable of accurately representing DTMF). In your case it may be translated from air interface to RFC 4733 without a tone actually being generated.

Normal gripe about using type=friend and canreinvite, when one is not the best choice and the other is a deprecated name.

Your allow comments are mixed up.

You haven’t marked up the dialplan code properly for the forum.

I’d strongly advise learning how to use Asterisk on a hard wired system before doing anything for which you need a transmitting licence.


#4

David

as per usual, I really appreciate the response. I have been only using asterix for a couple weeks now. so being able to bounce ideas of someone experienced is very helpful.

first, so context => parkedcalls should be in the [phones] context? I thought [global] served as a catch all so to speak for all contexts

what do you mean about gripe for type=friend?and canreinvite is an obsolete parameter (using asterisk 1.8.3)?

I thought i enabled DTMF with features.conf…parkedcall = #71. So i would have to add an extension in features.conf using the dial application to callup DTMF?

Also, what is the markup for the forum? I dont see any type of FAQ for the etiquette. im building a hardwired environment to learn asterisk from using soft phones, but learning the mobile side is something i have to pick up as well.


#5

Globals is for global variables in extensions.conf. The normal default section is general, but there isn’t one in extensions.conf.

canreinvite was replaced by directmedia at least half a decade ago. type=friend makes the system less secure and can cause calls on trunks to be mis-detected as locally originated calls. There are cases when it is needed, but you should not use it unless you do need it.

features.conf says what codes are used when the feature is enabled, but you have to enable it for each party in the call. (Otherwise, directmedia=yes would never work, as well as security problems with outside callers using features they shouldn’t access.)

It is not normal to include how to use the forum software in forum etiquette guides. It should be obvious that badly formatted quotations are not useful. You can hover over the various forum markup tools to see what they do, and this particular issue has come up so often today that just reading other posting would tell you. Specifically you need to use the </> button. I think you will find all forum software has something similar, although the way of invoking it may be different.