M
M
maniac_by2020-03-26 10:49:07
Asterisk
maniac_by, 2020-03-26 10:49:07

Why does one rule with different phones cause different behavior on Asterisk?

Hello everyone, there is one rule:
;start
exten => 5000,1,NoOP(${CALLERID(num)})
exten => 5000,n,Dial(SIP/5000,20)
exten => 5000,n,Dial( ${TRUNKMOBILE}80XXZZZZZZZ)
;end
This rule is in the main context.

But here, if everything works with one internal and mobile number, then it doesn’t work with another. Why?
Works:
-- Executing [[email protected]:1] Goto("SIP/mobile-000029f2", "office,1000,1") in new stack
-- Goto (office,1000,1)
-- Executing [1000 @office:1] NoOp("SIP/mobile-000029f2", "mobile") in new stack
-- Executing [[email protected]:2] Dial("SIP/mobile-000029f2", "SIP/1000,20") in new stack
[2020-03-25 18:55:05] WARNING[13560]: app_dial.c:2341 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [[email protected]:3] Dial("SIP/mobile-000029f2", "SIP/mobile/80XXZZZZZZ") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/mobile/80XXZZZZZZZ
-- SIP/mobile-000029f3 answered SIP/mobile-000029f2
-- Locally bridging SIP/mobile-000029f2 and SIP/mobile-000029f3
-- Executing [[email protected]:1] Congestion("SIP/mobile -000029f2", "1") in new stack
== Spawn extension (office, h, 1) exited non-zero on 'SIP/mobile-000029f2'
== Spawn extension (office, 1000,3) exited non-zero on 'SIP/mobile-000029f2'

Now it doesn't work:

-- Executing [[email protected]:1] Goto("SIP/mobile-00002a29", "office,2916,1") in new stack
-- Goto (office,2000,1)
-- Executing [[email protected]:1] NoOp("SIP/mobile-00002a29", "mobile") in new stack
-- Executing [[email protected]:2] Dial("SIP/mobile-00002a29", "SIP/ 2000.20") in new stack
== Using SIP VIDEO CoS mark 6
== Using SIP RTP CoS mark 5
-- Called SIP/2000
-- SIP/2000-00002a2a is ringing
-- Got SIP response 302 "Moved Temporarily" back from 192.168.199.122:5060
-- Now forwarding SIP/mobile-00002a29 to 'Local/[email protected]' (thanks to SIP/2000-00002a2a)
[2020-03-26 10:25:55] NOTICE[16896]: app_dial.c:901 do_forward: Not accepting call completion offers from call-forward recipient Local/[email protected]; 1
-- Executing [[email protected]:1] Playback("Local/[email protected];2", "pbx-invalid") in new stack
-- Local/[email protected];1 answered SIP/mobile- 00002a29
-- Playing 'pbx-invalid.alaw' (language 'ru')
-- Executing [[email protected]:2] Congestion("Local/[email protected];2", "1") in new stack
-- Executing [[email protected]:1] Congestion("SIP/mobile-00002a29", "1") in new stack
== Spawn extension (office, h, 1) exited non-zero on 'SIP/mobile-00002a29'
== Spawn extension (office, 2000, 2) exited non-zero on 'SIP/mobile-00002a29
'
-- Executing [[email protected]:1] Congestion("Local/[email protected];2", "1") in new stack
== Spawn extension (office, h, 1) exited non-zero on 'Local/ [email protected];2' What's

going on?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
M
maniac_by, 2020-03-26
@maniac_by

As always, he asked - he answered.
exten => 2000,hint,SIP/2000
Solves the problem of switching to dialing from a range.

R
Rsa97, 2020-03-26
@Rsa97

First, the logs do not match the given dialplan.
Secondly, read the logs carefully, they make it clear what
Hint is going on:

Got SIP response 302 "Moved Temporarily" back from 192.168.199.122:5060

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question