A
A
Aborigen10202019-08-02 08:42:57
Asterisk
Aborigen1020, 2019-08-02 08:42:57

And how to check the callgroup when making a call?

Hello!

As far as I know, callgroup is used to intercept calls coming to this group.

And how to use the callgroup value for an outgoing call? I want to direct different groups through different channels. I do this: I put in users.conf callgroup=12

in the dialplan I write:

exten => 89997778888,1,NoOp()
exten => 89997778888,n,Verbose(${CHANNEL(callgroup)})
exten => 89997778888,n,GotoIf($["${CHANNEL(callgroup)}" = "11"]?loccall)
exten => 89997778888,n,Hangup()
exten => 89997778888,n(loccall),Dial(SIP/gsm_gate/${EXTEN},60,tT))
exten => 89997778888,n,Hangup()


And I get it like this:
-- Executing [[email protected]_WorkDialPlan:1] NoOp("SIP/1042-00000281", "") in new stack
    -- Executing [[email protected]_WorkDialPlan:2] Verbose("SIP/1042-00000281", "11") in new stack
11
    -- Executing [[email protected]_WorkDialPlan:3] GotoIf("SIP/1042-00000281", "1?loccall") in new stack
    -- Goto (DLPN_WorkDialPlan,89997778888,5)
    -- Executing [[email protected]_WorkDialPlan:5] Dial("SIP/1042-00000281", "SIP/gsm_gate/89997778888,60,tT)") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/gsm_gate/89997778888


From the assumption that 11 is not a number, but a string, Aster received it and considers it to be true.
How can you still get a numeric value or check callgroup more accurately?

SOLUTION:
sip reload, as I already have group 12 specified for the user, and it is defined as 11 in the log.
Everything works.

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
R
Rsa97, 2019-08-02
@Aborigin1020

callgroup= 12
$["${CHANNEL(callgroup)}" = " 11 "

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question