[asterisk-users] Asterisk 1.8.1.1 Multiple Parking Lots

David Cabrejos drcabrejos at gmail.com
Wed Dec 22 21:23:47 UTC 2010


Asterisk Version: 1.8.1.1

Problem: Multiple Parking Lots

Issue: Not redirecting to the right parking lot. Always uses the first
parking lot from "parkedcalls show" or "features show"

Asterisk Working Version: 1.6.1

Steps Taken:

In features.conf added:

[parkinglot_test]
context => parkedcalls-test
parkext => 700
parkpos => 701-710
parkingtime => 120
findslot => next


In extensions.include at the bottom of [local-extensions-test]:

exten => 701,hint,park:701 at parkedcalls-test
exten => 702,hint,park:702 at parkedcalls-test


In extensions.include in [from-inside-redir-test] and
[from-inside-restricted-redir-test]:

include => parkedcalls-test


For each extension in sip.conf in [XXX-test]:

In between the existing 'vmexten' and 'secret' lines

parkinglot=parkinglot_test



Output from files "sip show peer 101-test.txt" and "sip show peer
102-test.txt" shows that parking lot is set to "parkinglot_test"

sip show peer 101-test
CODE: SELECT ALL
voice2*CLI> sip show peer 101-test


  * Name       : 101-test
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : from-inside-test
  Subscr.Cont. : local-extensions-test
  Language     :
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  Callgroup    :
  Pickupgroup  :
  MOH Suggest  :
  Mailbox      : 101 at default-test
  VM Extension : 101
  LastMsgsSent : 32767/65535
  Call limit   : 99
  Max forwards : 0
  Dynamic      : Yes
  Callerid     : "Test Tenant" <101>
  MaxCallBR    : 384 kbps
  Expire       : 956
  Insecure     : no
  Force rport  : Yes
  ACL          : No
  DirectMedACL : No
  T.38 support : Yes
  T.38 EC mode : FEC
  T.38 MaxDtgrm: -1
  DirectMedia  : No
  PromiscRedir : No
  User=Phone   : No
  Video Support: Yes
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : No
  Send RPID    : No
  Subscriptions: Yes
  Overlap dial : Yes
  DTMFmode     : rfc2833
  Timer T1     : 500
  Timer B      : 32000
  ToHost       :
  Addr->IP     : 10.211.0.42:5060
  Defaddr->IP  : (null)
  Prim.Transp. : UDP
  Allowed.Trsp : UDP
  Def. Username: 101-test
  SIP Options  : 100rel gruu path replaces replace timer
  Codecs       : 0x106 (gsm|ulaw|g729)
  Codec Order  : (g729:20,ulaw:20,gsm:20)
  Auto-Framing :  No
  100 on REG   : No
  Status       : OK (34 ms)
  Useragent    : Aastra 55i/2.6.0.1008
  Reg. Contact : sip:101-test at 10.211.0.42:5060;transport=udp
  Qualify Freq : 60000 ms
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  RTP Engine   : asterisk
  Parkinglot   : parkinglot_test
  Use Reason   : No
  Encryption   : No


sip show peer 102-test
CODE: SELECT ALL
voice2*CLI> sip show peer 102-test


  * Name       : 102-test
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : from-inside-test
  Subscr.Cont. : local-extensions-test
  Language     :
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  Callgroup    :
  Pickupgroup  :
  MOH Suggest  :
  Mailbox      : 102 at default-test
  VM Extension : 102
  LastMsgsSent : 32767/65535
  Call limit   : 99
  Max forwards : 0
  Dynamic      : Yes
  Callerid     : "Test Tenant" <102>
  MaxCallBR    : 384 kbps
  Expire       : 2363
  Insecure     : no
  Force rport  : Yes
  ACL          : No
  DirectMedACL : No
  T.38 support : Yes
  T.38 EC mode : FEC
  T.38 MaxDtgrm: -1
  DirectMedia  : No
  PromiscRedir : No
  User=Phone   : No
  Video Support: Yes
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : No
  Send RPID    : No
  Subscriptions: Yes
  Overlap dial : Yes
  DTMFmode     : rfc2833
  Timer T1     : 500
  Timer B      : 32000
  ToHost       :
  Addr->IP     : 10.211.0.41:5060
  Defaddr->IP  : (null)
  Prim.Transp. : UDP
  Allowed.Trsp : UDP
  Def. Username: 102-test
  SIP Options  : (none)
  Codecs       : 0x106 (gsm|ulaw|g729)
  Codec Order  : (g729:20,ulaw:20,gsm:20)
  Auto-Framing :  No
  100 on REG   : No
  Status       : OK (31 ms)
  Useragent    : Aastra 55i/2.6.0.1008
  Reg. Contact : sip:102-test at 10.211.0.41:5060;transport=udp
  Qualify Freq : 60000 ms
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  RTP Engine   : asterisk
  Parkinglot   : parkinglot_test
  Use Reason   : No
  Encryption   : No


File "debug.txt" shows that when a call is parked, it is NOT sending over to
parkinglot_test, but parkinglot_fitts.

Debug.txt
CODE: SELECT ALL
  == Using UDPTL CoS mark 5
  == Using SIP RTP CoS mark 5
    -- Called 101-test
  == Extension Changed 101[local-extensions-test] new state Ringing for
Notify User 102-test
    -- SIP/101-test-00000035 is ringing
    -- SIP/101-test-00000035 is ringing
  == Extension Changed 101[local-extensions-test] new state InUse for Notify
User 102-test
    -- SIP/101-test-00000035 answered SIP/DASH_SIP_TRUNK_DENVER-00000033
    -- Started music on hold, class 'default-test', on
SIP/DASH_SIP_TRUNK_DENVER-00000033
  == Extension Changed 101[local-extensions-test] new state Hold for Notify
User 102-test
  == Using UDPTL CoS mark 5
  == Using SIP RTP CoS mark 5
    -- Executing [700 at from-inside-test:1] Macro("SIP/101-test-00000036",
"tl-set-variables2,from-inside-redir-test,test") in new stack
    -- Executing [s at macro-tl-set-variables2:1] Set("SIP/101-test-00000036",
"__tenant=test") in new stack
    -- Executing [s at macro-tl-set-variables2:2] Set("SIP/101-test-00000036",
"CDR(userfield)=test") in new stack
    -- Executing [s at macro-tl-set-variables2:3] Set("SIP/101-test-00000036",
"__FROM_INSIDE=1") in new stack
    -- Executing [s at macro-tl-set-variables2:4] Set("SIP/101-test-00000036",
"__MOH=default-test") in new stack
    -- Executing [s at macro-tl-set-variables2:5]
GotoIf("SIP/101-test-00000036", "1 ?setmoh") in new stack
    -- Goto (macro-tl-set-variables2,s,7)
    -- Executing [s at macro-tl-set-variables2:7] Set("SIP/101-test-00000036",
"CHANNEL(musicclass)=default-test") in new stack
    -- Executing [s at macro-tl-set-variables2:8] Goto("SIP/101-test-00000036",
"from-inside-redir-test,700,1") in new stack
    -- Goto (from-inside-redir-test,700,1)
  == Channel 'SIP/101-test-00000036' jumping out of macro
'tl-set-variables2'
    -- Executing [700 at from-inside-redir-test:1]
Park("SIP/101-test-00000036", "") in new stack
  == Parked SIP/101-test-00000036 on 701 (lot parkinglot_fitts). Will
timeout back to extension [from-inside-redir-test] s, 1 in 120 seconds
    -- Added extension '701' priority 1 to parkedcalls-fitts
    -- <SIP/101-test-00000036> Playing 'digits/7.g729' (language 'en')
    -- <SIP/101-test-00000036> Playing 'digits/0.g729' (language 'en')
    -- <SIP/101-test-00000036> Playing 'digits/1.g729' (language 'en')
    -- Started music on hold, class 'default-test', on SIP/101-test-00000036
  == Spawn extension (from-inside-redir-test, s, 1) exited non-zero on
'Parked/SIP/101-test-00000036<ZOMBIE>'
    -- Executing [h at from-inside-redir-test:1]
Hangup("Parked/SIP/101-test-00000036<ZOMBIE>", "") in new stack
  == Spawn extension (from-inside-redir-test, h, 1) exited non-zero on
'Parked/SIP/101-test-00000036<ZOMBIE>'


If deleting parkinglot_fitts, and parking a call again, it will redirect to
parkinglot_coventry (the next from the top of the list on "parkedcalls show"
or "features show").

parkedcalls show
CODE: SELECT ALL
voice2*CLI> parkedcalls show
Num                   Channel (Context         Extension    Pri ) Timeout
*** Parking lot: parkinglot_fitts (1)
701            SIP/101-test-00000036 (from-inside-redir-test s            1
  )     12s
*** Parking lot: parkinglot_coventry (1)
*** Parking lot: parkinglot_startthinking (0)
*** Parking lot: parkinglot_legasus (0)
*** Parking lot: parkinglot_serenity (0)
*** Parking lot: parkinglot_test (0)
*** Parking lot: parkinglot_thunder (0)
*** Parking lot: parkinglot_applianz (0)
*** Parking lot: parkinglot_armstrong (0)
*** Parking lot: parkinglot_tier2sales (0)
*** Parking lot: parkinglot_alarm (0)
*** Parking lot: default (0)
*** Parking lot: parkinglot_crussell (0)
*** Parking lot: parkinglot_liberty (0)
*** Parking lot: parkinglot_agape (0)
*** Parking lot: parkinglot_hubris (0)
*** Parking lot: parkinglot_mpm (0)
*** Parking lot: parkinglot_radioks (0)
---
1 parked call in total.


features show
CODE: SELECT ALL
voice2*CLI> features show
Builtin Feature           Default Current
---------------           ------- -------
Pickup                    *8      **
Blind Transfer            #       ##
Attended Transfer                 #*
One Touch Monitor                 #9
Disconnect Call           *       #0
Park Call
One Touch MixMonitor

Dynamic Feature           Default Current
---------------           ------- -------
(none)

Feature Groups:
---------------
(none)

Call parking (Parking lot: parkinglot_fitts)
------------
Parking extension     :      700
Parking context       :      parkedcalls-fitts
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_coventry)
------------
Parking extension     :      700
Parking context       :      parkedcalls-coventry
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_startthinking)
------------
Parking extension     :      700
Parking context       :      parkedcalls-startthinking
Parked call extensions:      701-710
Parkingtime           :      90000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_legasus)
------------
Parking extension     :      700
Parking context       :      parkedcalls-legasus
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_serenity)
------------
Parking extension     :      700
Parking context       :      parkedcalls-serenity
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_test)
------------
Parking extension     :      700
Parking context       :      parkedcalls-test
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_thunder)
------------
Parking extension     :      700
Parking context       :      parkedcalls-thunder
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_applianz)
------------
Parking extension     :      700
Parking context       :      parkedcalls-applianz
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_armstrong)
------------
Parking extension     :      700
Parking context       :      parkedcalls-armstrong
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_tier2sales)
------------
Parking extension     :      700
Parking context       :      parkedcalls-tier2sales
Parked call extensions:      701-710
Parkingtime           :      180000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_alarm)
------------
Parking extension     :      700
Parking context       :      parkedcalls-alarm
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: default)
------------
Parking extension     :      700
Parking context       :      parkedcalls
Parked call extensions:      701-704
Parkingtime           :      180000
MusicOnHold class     :      default


Call parking (Parking lot: parkinglot_crussell)
------------
Parking extension     :      700
Parking context       :      parkedcalls-crussell
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_liberty)
------------
Parking extension     :      700
Parking context       :      parkedcalls-liberty
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_agape)
------------
Parking extension     :      700
Parking context       :      parkedcalls-agape
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_hubris)
------------
Parking extension     :      700
Parking context       :      parkedcalls-hubris
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_mpm)
------------
Parking extension     :      700
Parking context       :      parkedcalls-mpm
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Call parking (Parking lot: parkinglot_radioks)
------------
Parking extension     :      700
Parking context       :      parkedcalls-radioks
Parked call extensions:      701-710
Parkingtime           :      120000
MusicOnHold class     :


Not sure what is the parameter being used to defined what is the top of the
list on "parkedcalls show" or "features show", however it's not working the
way its supposed to.

Please let me know if there are any problems with my current config. Of
course I did not put all the information on sip.conf file since it was too
huge and had private information on it.

sip.conf
CODE: SELECT ALL
[general]
bindport=5060
port=5060
bindaddr=0.0.0.0
disallow=all
allow=ulaw
allow=alaw
allow=gsm
callerid=unknown
context=from-outside            ; Default context for incoming calls

allowsubscribe=yes
notifyhold=yes
notifyringing=yes
limitonpeer=yes
videosupport=yes
t38pt_udptl=yes            ; Default false
alwaysauthreject=yes
progressinband=never

[101-test]
qualify=2000
nat=yes
callerid=Test Tenant <101>
context=from-inside-test
call-limit=99
canreinvite=no
vmexten=101
parkinglot=parkinglot_test
secret=XXXXXXXXXX
host=dynamic
username=101-test
defaultuser=101-test
subscribecontext=local-extensions-test
dtmfmode=rfc2833
type=friend
mailbox=101 at default-test
disallow=all
allow=g729
allow=ulaw
allow=gsm

[102-test]
qualify=2000
nat=yes
callerid=Test Tenant <102>
context=from-inside-test
call-limit=99
canreinvite=no
vmexten=102
parkinglot=parkinglot_test
secret=XXXXXXXXXX
host=dynamic
username=102-test
defaultuser=102-test
subscribecontext=local-extensions-test
dtmfmode=rfc2833
type=friend
mailbox=102 at default-test
disallow=all
allow=g729
allow=ulaw
allow=gsm


Also, let me know if any other output file is needed and more testing will
be done to solve this problem.

Any ideas or other hints on solving this is greatly appreciated.

Thank you,


PS: Have posted also this on the following forum:
http://forums.digium.com/viewtopic.php?f=1&t=76529&sid=dc731d8832e381826ba8c5da6483bdd1

-- 
David Cabrejos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20101222/b35b1ac0/attachment-0001.htm>


More information about the asterisk-users mailing list