AMI and macro on dialplan

Hello to all,

my first post here on API and also giving my first steps building some.

Have been some issues getting this work and I will try to explain better I can.

Im testing the commands trought telnet and I cannot put this working

1st - telnet serverip 5038
Action: Login
Username: testuser
Secret: testsecret

Action: Originate
Channel: sip/12345
Exten: 1234
Context: default

But now in my default context I have a macro that is:

exten => s,1,Wait(1)
exten => s,2,Dial(sip/${ARG1}@server1)

exten => s,3,Dial(sip/${ARG1}@server2)

exten=> 1234,1,Macro(dial,${EXTEN})

However it doesnt assume the ARG1 and connects to the server1 and 2 without any Number.

– Called @server1
– SIP/server1-00004f41 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [s@macro-dial:3] Dial(“SIP/0001-00004f40”, “SIP/s@server2|60”) in new stack
– Called @server2

it doesnt pass the ARG to the macro. But if I change to:

exten=> 1234,1,Dial(SIP/${EXTEN}))

it works

Anyone know how to work arroung this?

many thanks

Macro is a deprecated application, I recommend you re-write your dialplan using subroutines.

Set your verbosity to 10 on the console and run your originate action again and give us the full dialplan output, not just the final few lines.

Hi John,

thank you for you reply. I will check how to migrate my dialplan to subroutines.

Found that the problem was the wating time (1) :frowning: just removed it from the macro em it works fine.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.