Cmd dial timeout don't work in asterisk 1.2?

Hello.

My dial timeout worked perfectly on the last asterisk but not on the new ver 1.2.

Here is my extension.conf :

exten => s,1,Answer()
exten => s,2,noop(${CALLERID})
exten => s,3,Set(TIMEOUT(response)=20)
exten => s,4,Background(test)
exten => s,5,Dial(Zap/2|${CALLERID},15)
exten => s,6,GoTo(personnedispo,s,1)
exten => s,106,GoTo(tousoccupe,s,1)

When it start to dial ( s,5), it nevers stops… and never go to 6 or 106.

Do you know why ?

here is the output :

*CLI> – Starting simple switch on ‘Zap/4-1’
– Executing Answer(“Zap/4-1”, “”) in new stack
– Executing NoOp(“Zap/4-1”, “0675123456”) in new stack
– Executing Set(“Zap/4-1”, “TIMEOUT(response)=20”) in new stack
– Response timeout set to 20
– Executing BackGround(“Zap/4-1”, “test”) in new stack
– Playing ‘test’ (language ‘fr’)
– Executing Dial(“Zap/4-1”, “Zap/2|0675123456|15”) in new stack
– Called 2
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing
– Zap/2-1 is ringing

nobody knows ?

I’m not an expert (yet :smiley: ) but since nobody else has responded yet, I’ll take a shot at this.

This is just speculation, since I don’t dial out on Zap.

I think your command is dialing the number 2 on your Zap channel. I presume you’re trying to dial the number in ${CALLERID}, right?

Anyway, that’s the way I read the -- Called 2 line in your console output. If that’ s true, then perhaps it’s reading the phone number (0675123456) as the timeout value.

The issue is that I’m not clear on exactly how Asterisk parses the “|”,"/", and “,” tokens. It seems somewhat ambiguous to me, at least reading the documentation. And it seems possible that this parsing may have changed in 1.2, leading to your problem.

As an experiment, you might try a couple of alternatives and see what happens. Maybe try: Dial(Zap/2,${CALLERID},15) or maybe (I don’t think the following is quite right, since you’re not specifying which zap channel, but it might be worth trying):

hello.

no that is not what i want.

What i want is to dial zap/2 and send him the callerid number of the caller.

Thank you for your help.

Again, take my advice with a grain of salt since I’m still a newbie.

But, don’t you have to provide a phone number to Zap/2?

Don’t you want something like Dial(Zap/2/5551212,…)?

And what do you mean by “send him the caller id”? I think, if you want the callerid set for your outbound call, you need to do something like:

Set(CALLERID(number)=1234567)

Thank you.

Zap/2 is an fxs port not an fxo port.

It is a local phone pluged in the pc. What i wanted to do is to ring this local phone… and send him the number (caller id) of the caller who calles from a fxo port.

The callerID of the incoming call is not delivered by the Dial() command.

You would simply want to setup your zapata.conf file as:

usecallerid=yes

All you would need is a callerID display on the FXS phone, and you should see the incoming callerID.