[asterisk-users] Problem with parking

Örn Arnarson orn at arnarson.net
Thu Feb 12 09:55:57 CST 2009


Update on the matter:

I have reduced the config to one context and two peers:
extensions.conf:

[internal]
include => parkedcalls
exten => 2552,1,Dial(SIP/2552,,t)
exten => 2556,1,Dial(SIP/2556,,t)

sip.conf:
[general]
context=deadend
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=no

[2552]
type=friend
context=dialplan-1
host=dynamic
call-limit=10
defaultuser=2552
secret=xxxxxxx

[2556]
type=friend
context=dialplan-1
host=dynamic
call-limit=10
defaultuser=2556
secret=xxxxxxx

features.conf:
[general]
parkext => 10
parkpos => 11-14
parkingtime => 45

[featuremap]
blindxfer => #

That's all. I am starting to think that this must be an asterisk bug...
version is 1.6.0.1.

Regards,
Örn


On Thu, Feb 12, 2009 at 3:05 PM, Örn Arnarson <orn at arnarson.net> wrote:

> Hi,
>
> I'm having problem with call parking.
> When I park call, either via transfer to xten or park digit sequence from
> features.conf, I hear the parking lot number read to me and the user gets
> transferred.
>
> However, MOH stops for the caller the moment user is transferred.
> The user can be retrieved by dialing the parked extension and voice
> resumes.
> If the parked user hangs up, the channel state does not update (nor the
> hint) and call seems to be live still.
> If the timeout for the park is reached, the user is not transferred back
> (nothing happens actually -- he is just able to stay parked forever).
> Even after the user hangs up, the parking lot extension exists and is
> callable, but when that is done (the parking extension is called), it
> answers and promptly hangs up and then is available for parking again.
>
> Yesterday I had everything working like a charm, and I don't think I have
> changed anything, although that seems increasingly unlikely since things
> don't usually break on their own. I've restarted asterisk numerous times and
> tried changing things I think are relevant, but with no avail.
>
> It does not matter whether the caller is coming in from a SIP trunk or a
> SIP peer.
>
> The SIP messages look normal. When the caller hangs up while parked he
> sends a BYE to the asterisk to the callee's number, and the asterisk replies
> with ACK.
>
> Any help would be appreciated.
>
> My comments in asterisk CLI output below prefixed by #####
>
> ==== Configuration files ====
>
> == features.conf ==
> [general]
> parkext => 10
> parkpos => 11-14
> parkinghints = yes
>
> == sip.conf ==
> [general]
> context=deadend
> allowoverlap=no
> bindport=5060
> bindaddr=0.0.0.0
> srvlookup=no
> subscribecontext=parkedcalls
> allowsubscribe=yes
> notifyringing=yes
> notifyhold=yes
> limitonpeers=yes
> canreinvite=no
>
> [Tal]
> context=incoming
> type=friend
> host=XXX.XXX.XXX.XXX
> canreinvite=no
> port=5060
> dtmfmode=rfc2833
> disallow=all
> allow=alaw
>
> [smg01]
> type=friend
> context=incoming
> host=XXX.XXX.XXX.XXX
> canreinvite=no
> port=5060
> dtmfmode=rfc2833
> disallow=all
> allow=alaw
>
> [2552]
> type=friend
> context=dialplan-1
> host=dynamic
> call-limit=10
> defaultuser=2552
> secret=xxxxxxx
>
> [2556]
> type=friend
> context=dialplan-1
> host=dynamic
> call-limit=10
> defaultuser=2556
> secret=xxxxxxx
>
> == extensions.conf ==
> [globals]
> CID => 5822550
> OCODE => 582
> XTENS => 255X
> DTRK => smg01
> CONF => 2559
> ADALNUMER => 2550
> ADALDIAL => SIP/2551&SIP/2552&SIP/2553&SIP/2554
> BAKVAKT => 7712555
>
> [general]
> static=yes
> writeprotect=yes
> clearglobalvars=no
> userscontext=default
>
> [dialplan-1]
> include => conferences
> include => ringgroups
> include => internal
> include => landlines
> include => gsm
> include => special
> include => international
> include => parkedcalls
>
> [dialplan-2]
> include => conferences
> include => ringgroups
> include => internal
> include => landlines
> include => parkedcalls
>
> [dialplan-3]
> include => conferences
> include => ringgroups
> include => internal
> include => landlines
> include => gsm
> include => parkedcalls
>
> [dialplan-4]
> include => conferences
> include => ringgroups
> include => internal
> include => landlines
> include => international
> include => parkedcalls
>
> [incoming]
> exten => 4891001,1,Set(CALLERID(name)=SMG01)
> exten => 4891001,n,Dial(${ADALDIAL})
> exten =>
> ${CID},1,Macro(ringgroup,${ADALDIAL},ADALNUMER,${ADALNUMER},ringgroup)
> exten => ${OCODE}${CONf},1,Goto(conferences,${EXTEN:3},1)
> exten => _${OCODE}${XTENS},1,Set(CALLERID(name)=BEIN HRINGING)
> exten => _${OCODE}${XTENS},n,Macro(internal-call,${EXTEN:3},incoming)
>
> [internal]
> exten => _${XTENS},1,Macro(internal-call,${EXTEN},internal)
> exten => *80,1,Page(SIP/2553)
> exten => *97,1,VoiceMailMain(${CALLERID(num)},s)
> exten => *98,1,Playback(templokun)
> exten => *99,1,Record(templokun.wav)
> exten => _9X.,1,Macro(trunkdial,Tal,${EXTEN:1},${CALLERID(num)},landline)
>
> [landlines]
> exten =>
> _800XXXX,1,Macro(trunkdial,${DTRK},${EXTEN},${CALLERID(num)},tollfree)
> exten =>
> _[4-5]XXXXXX,1,Macro(trunkdial,${DTRK},${EXTEN},${CALLERID(num)},landline)
> exten =>
> _177X,1,Macro(trunkdial,${DTRK},${EXTEN},${CALLERID(num)},landline)
> exten => 1817,1,Macro(trunkdial,${DTRK},${EXTEN},${CALLERID(num)},landline)
> exten => 1414,1,Macro(trunkdial,${DTRK},${EXTEN},${CALLERID(num)},landline)
>
> [gsm]
> exten =>
> _[6-8]XXXXXX,1,Macro(trunkdial,${DTRK},${EXTEN},${CALLERID(num)},gsm)
>
> [special]
> exten => 112,1,Macro(trunkdial,${DTRK},${EXTEN},$CALLERID(num)},emergency)
> exten => _11X,1,Macro(trunkdial,${DTRK},${EXTEN},${CALLERID(num)},special)
> exten => _15X,1,Macro(trunkdial,${DTRK},${EXTEN},${CALLERID(num)},special)
> exten =>
> _9XXXXXX,1,Macro(trunkdial,${DTRK},${EXTEN},${CALLERID(num)},special)
>
> [international]
> exten =>
> _00x.,1,Macro(trunkdial,${DTRK},${EXTEN},${CALLERID(num)},international)
>
> [conferences]
> exten => ${CONF},1,MeetMe(1,MsI)
>
> [ringgroups]
> exten =>
> ${ADALNUMER},1,Macro(ringgroup,${ADALDIAL},ADALNUMER,${ADALNUMER},internal)
>
> [forwarding]
> exten => _X.,1,Set(CALLERID(all)=${origcid})
> exten => _X.,n,Set(GLOBAL(origcid)=)
> exten => _X.,n,Goto(dialplan-1,${DB(CF/${EXTEN})},1)
>
> [2550]
> exten => s,1,Answer()
> exten => s,n,Background(templokun)
> exten => s,n,WaitExten(4)
>
> exten => 1,1,VoiceMail(2550)
> exten => 2,1,Playback(bakvakt)
> exten => 2,n,Goto(dialplan-1,${BAKVAKT},1)
>
> [macro-ringgroup]
> exten => s,1,Set(CDR(userfield)=${ARG4})
> exten => s,n,Set(CALLERID(name)=${ARG2})
> exten => s,n,ExecIf(${DB(${ARG3}/lokad)}?Goto(${ADALNUMER},s,1))
> exten => s,n,Dial(${ARG1})
>
> [macro-trunkdial]
> exten => s,1,Set(CDR(userfield)=${ARG4})
> exten => s,n,Set(CALLERID(all)=${CID})
> exten =>
> s,n,ExecIf($[${DB(CID/${ARG3})}]?Set(CALLERID(all)=${OCODE}${ARG3}))
> exten => s,n,ExecIf($[${ARG4} =
> international]?Set(CALLERID(all)=+354${CALLERID(num)}))
> exten => s,n,Dial(SIP/${ARG1}/${ARG2})
> exten => s,n,Goto(s-${DIALSTATUS},1)
> exten => s-NOANSWER,1,Hangup
> exten => s-BUSY,1,Hangup
> exten => _s-.,1,NoOp
>
> [macro-internal-call]
> exten => s,1,Set(CDR(userfield)=${ARG2})
> exten => s,n,Set(TIMEOUT=90)
> exten => s,n,ExecIf(${DB(CF/${ARG1})}?Set(GLOBAL(origcid)=${ARG1}))
> exten =>
> s,n,ExecIf(${DB(CF/${ARG1})}?Dial(local/${DB(CF/${ARG1})}@forwarding/n))
> exten => s,n,ExecIf(${DB(VM/${ARG1})}?Set(TIMEOUT=25)
> exten => s,n,Dial(SIP/${ARG1},${TIMEOUT},tw)
> exten => s,n,Goto(s-${DIALSTATUS},1)
> exten => s-NOANSWER,1,ExecIF(${DB(VM/${ARG1})}?VoiceMail(${ARG1}))
> exten => s-NOANSWER,n,Hangup
> exten => s-BUSY,1,ExecIF(${DB(VM/${ARG1})}?VoiceMail(${ARG1}))
> exten => s-BUSY,n,Hangup
> exten => _s-.,1,NoOp
>
>
>
> ==== Call sequence ====
>
> 2556 calls 2552. [a calls b]
> 2552 answers call [b answers]
> 2552 presses # (blind xfer) [b starts transfer]
> 2556 hears MOH [a hears MOH]
> 2552 presses 10 (to transfer to parking lot) [b enters 10]
> 2556 stops hearing MOH [a stops hearing MOH]
> 2552 hears asterisk read 11 aloud (parking lot number) and subsequently
> hangs up [a hears parking lot number and hangs up]
> 2556 is in parking lot, total silence on phone [b is in lot with no MOH, or
> a hissing noise if he was transferred at a certain time in MOH]
> 2556 hangs up [b hangs up]
> 2552 calls 11 (which is parking lot slot) [a calls 11]
> 11 answers and hangs up
>
>
> ==== Asterisk console output ====
>
>   == Using SIP RTP CoS mark 5
>     -- Executing [2552 at dialplan-1:1] Macro("SIP/2556-0821d078",
> "internal-call,2552,internal") in new stack
>     -- Executing [s at macro-internal-call:1] Set("SIP/2556-0821d078",
> "CDR(userfield)=internal") in new stack
>     -- Executing [s at macro-internal-call:2] Set("SIP/2556-0821d078",
> "TIMEOUT=90") in new stack
>     -- Executing [s at macro-internal-call:3] ExecIf("SIP/2556-0821d078",
> "?Set(GLOBAL(origcid)=2552)") in new stack
>     -- Executing [s at macro-internal-call:4] ExecIf("SIP/2556-0821d078",
> "?Dial(local/@forwarding/n)") in new stack
>     -- Executing [s at macro-internal-call:5] ExecIf("SIP/2556-0821d078",
> "?Set(TIMEOUT=25") in new stack
>     -- Executing [s at macro-internal-call:6] Dial("SIP/2556-0821d078",
> "SIP/2552,90,tw") in new stack
>   == Using SIP RTP CoS mark 5
>     -- Called 2552
>     -- SIP/2552-08242a10 is ringing
>     -- SIP/2552-08242a10 answered SIP/2556-0821d078
>     -- Started music on hold, class 'default', on SIP/2556-0821d078
>     -- <SIP/2552-08242a10> Playing 'pbx-transfer.slin' (language 'en')
>     -- Stopped music on hold on SIP/2556-0821d078
>     -- Started music on hold, class 'default', on SIP/2556-0821d078
>   == Parked SIP/2556-0821d078 on 11 at parkedcalls. Will timeout back to
> extension [dialplan-1] 2552, 1 in 45 seconds
>     -- <SIP/2552-08242a10> Playing 'digits/1.slin' (language 'en')
>     -- <SIP/2552-08242a10> Playing 'digits/1.slin' (language 'en')
>     -- Added extension '11' priority 1 to parkedcalls (0x8209928)
>   == Extension Changed 11[default] new state InUse for Notify User 2552
>   == Spawn extension (macro-internal-call, s, 6) exited KEEPALIVE in macro
> 'internal-call' on 'SIP/2556-0821d078'
>   == Spawn extension (dialplan-1, 2552, 1) exited KEEPALIVE on
> 'SIP/2556-0821d078'
>
> ##### at this point 2556 has hung up, but asterisk doesn't realize new
> status. SIP message from 2556 to * shows that 2556 sends BYE to 2552.
> ##### However, even though channel has hung up, State of 11 at parkedcallsstill shows InUse.
>
> simstod*CLI> core show hints
> simstod*CLI>
>     -= Registered Asterisk Dial Plan Hints =-
>                      14 at parkedcalls         : park:14 at parkedcalls
> State:Idle            Watchers  1
>                      13 at parkedcalls         : park:13 at parkedcalls
> State:Idle            Watchers  1
>                      12 at parkedcalls         : park:12 at parkedcalls
> State:Idle            Watchers  1
>                      11 at parkedcalls         : park:11 at parkedcalls
> State:InUse           Watchers  1
> ----------------
> - 4 hints registered
>
> ##### If 2552 calls 11 at this point, it just answers and hangs up, thus
> putting the state back to InUse
>
>     -- Executing [11 at dialplan-1:1] ParkedCall("SIP/2552-08242a10", "11")
> in new stack
>
>   == Extension Changed 11[default] new state Idle for Notify User 2552
>     -- Channel SIP/2552-08242a10 connected to parked call 11
>     -- Stopped music on hold on SIP/2556-0821d078
>   == Spawn extension (dialplan-1, 11, 1) exited non-zero on
> 'SIP/2552-08242a10'
>
>
>
> ##### It is also worth noting that even if call reaches 45 seconds in
> length after transfer, it does not transfer back to 2552. It just stays in
> the parking lot indefinitely.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090212/98fa53f3/attachment.htm 


More information about the asterisk-users mailing list