Hello, thank you for your fast reply.
I looked for documentation about the topic in Internet and I found examples with the same structure that you indicate me, but this is what happens:
- extensions.conf:
[outgoing]
exten => _X.,1,GotoIf($["${CALLERID(num):3}" = “107”]?outgoing_2,${EXTEN},1)
exten => _X.,2,set(CALLERID(number)=967175757)
exten => _X.,3,dial(SIP/${EXTEN}@Provider1,50)
exten => _X.,4,hangup()
[outgoing_2]
exten => _X.,1,set(CALLERID(number)=967608487)
exten => _X.,n,dial(SIP/${EXTEN}@Provider2,50)
exten => _X.,n,hangup()
- console:
== Using SIP RTP CoS mark 5
– Executing [610818983@outgoing:1] GotoIf(“SIP/101-00002be8”, “0?outgoing_2,610818983,1”) in new stack
– Executing [610818983@outgoing:2] Set(“SIP/101-00002be8”, “CALLERID(number)=967175757”) in new stack
– Executing [610818983@outgoing:3] Dial(“SIP/101-00002be8”, “SIP/610818983@Provider1,50”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/610818983@Provider1
– SIP/Provider1-00002be9 is making progress passing it to SIP/101-00002be8
– SIP/Provider1-00002be9 is ringing
== Spawn extension (start, 610818983, 3) exited non-zero on ‘SIP/101-00002be8’
With this instruction the condition is truncated “0?outgoing_2,610818983,1” and it execute the following priority.
However with the instruction that I indicated in the first post, returns the condition correctly but it does not realize the function correctly.
- extensions.conf:
[outgoing]
exten => _X.,1,GotoIf(${CALLERID(number)}=101?outgoing_2,${EXTEN},1)
exten => _X.,2,set(CALLERID(number)=967175757)
exten => _X.,3,dial(SIP/${EXTEN}@Provider1,50)
exten => _X.,4,hangup()
[outgoing_2]
exten => _X.,1,set(CALLERID(number)=967608487)
exten => _X.,n,dial(SIP/${EXTEN}@Provider2,50)
exten => _X.,n,hangup()
- console:
== Using SIP RTP CoS mark 5
– Executing [610818983@outgoing:1] GotoIf(“SIP/107-00002c08”, “107=101?outgoing_2,610818983,1”) in new stack
– Goto (outgoing_2,610217933,1)
– Executing [610818983@outgoing_2:1] Set(“SIP/107-00002c08”, “CALLERID(number)=967608487”) in new stack
– Executing [610818983@outgoing_2:2] Dial(“SIP/107-00002c08”, “SIP/610818983@Provider2,50”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/610818983@Provider2
– SIP/Provider2-00002c09 is making progress passing it to SIP/107-00002c08
– SIP/Provider2-00002c09 is ringing
Sorry to insist in the topic, but I can’t make the work correctly. Please help me.
Thank you.