This is what I do with Goto()
[from-internal]
;======================== Include Context ===========================
include => outgoing-belgium-voip
include => outgoing-selfone-voip
include => international-calls
;========================= Choose your CallerID ========================
exten => 300,1,NoOp(## Outgoing Call from Selfone ##)
same => n,NoOp(## Your CallerID is : ${CALLERID(all)} for ${EXTEN} ##)
same => n,Set(CALLERID(num)=028085449)
same => n,GotoIf(BXL_IN1=${CALLERID(num)}?selfone:end)
same => n(selfone),Playback(enter-ext-of-person)
same => n,WaitExten(30)
same => n,Goto(outgoing-selfone-voip,${EXTEN},1)
same => n(end),Hangup()
;=================Patterns for Outgoing Calls from Belgium VoIP ===================
[outgoing-belgium-voip]
exten => _0XXX,1,NoOp(Belgium-Voip : Outbound Call to the ${EXTEN})
same => n,Ringing()
same => n,Dial(PJSIP/${EXTEN}@belgium-voip)
same => n,Hangup()
exten => _0XXXXXXXX,1,NoOp(Belgium-Voip : Outbound Call to the ${EXTEN})
same => n,Ringing()
same => n,Dial(PJSIP/${EXTEN}@belgium-voip)
same => n,Hangup()
exten => _0XXXXXXXXX,1,NoOp(Belgium-Voip - Outbound Call to the ${EXTEN})
same => n,Ringing()
same => n,Dial(PJSIP/${EXTEN}@belgium-voip)
same => n,Hangup()
;========================= Patterns for Outgoing Calls from Selfone ========================
[outgoing-selfone-voip]
exten => _0XXX,1,NoOp(Selfone : Outbound Call to the ${EXTEN})
same => n,Dial(PJSIP/${EXTEN}@selfone-voip)
same => n,Hangup()
exten => _0XXXXXXXX,1,NoOp(Selfone : Outbound Call to the ${EXTEN})
same => n,Dial(PJSIP/${EXTEN}@selfone-voip)
same => n,Hangup()
exten => _0XXXXXXXXX,1,NoOp(Selfone : Outbound Call to the ${EXTEN})
same => n,Dial(PJSIP/${EXTEN}@selfone-voip)
same => n,Hangup()
But I’m alway out with Belgium Voip,
, why he don’t go to the context [outgoing-selfone-voip] ?