[asterisk-users] How to list used extensions + assign extension toa roaming phone

Axelle aafortinet at gmail.com
Thu Dec 23 10:13:04 UTC 2010


Hi Danny,

> For question 1, I think "sip show peers" is what you want.

Yes, indeed. Thanks.
Though, there's something strange with it, but probably related to
question 2 below.

>  For question 2,
> here are two ways to do it.

I tried both ways but couldn't get it working. In both cases, this is
what happened:

I have phones (non-roaming) to which I have assigned numbers such as
2102, 2103 etc.
The roaming phone can call the other phones (for eg 2103) without problem.
But strange, when he calls 2103, 2103 sees an incoming call of 2111,
which is the last of the non-roaming phone numbers I configured. And
on asterisk command line,
sip show peers
shows as if 2103 and 2111 were online
and sip show channels
shows as if 2103 and 2111 were in the middle of their call !
Though, I checked it, 2111 is offline. The only two phones online are
2103 and the roaming phone.
Looks like a bug in my config, huh ?

Now, the other way round, 2103 can't call the roaming phone (which is
what I would have liked). I tried 2103 call 2111, but that doesn't
work (and confirms 2111 is offline). I tried 2103 calls 3000 or 3001,
no success.

Can somebody help debug this?

Here is my config:

[sip-local]
exten => 2103,1,Macro(dialSIP,IMSIA)
exten => 2104,1,Macro(dialSIP,IMSIB)
exten => 2105,1,Macro(dialSIP,IMSIC)
exten => 2110,1,Macro(dialSIP,IMSID)
exten => 2111,1,Macro(dialSIP,IMSIE)
; roaming users
; I tried both solutions:
;exten => 3xxx,1,dial(SIP/foo)
exten => 3001,1(readop),BackGround(beep)
exten => 3001,n,Read(digito,assignroam,3)
exten => 3001,n,SayDigits(${digito})
exten => 3001,n,Set(ROAM=${digito})
exten => 3001,n,Set(DB(roam/ext)=${digito})
exten => 3001,n,playback(vm-goodbye)
exten => 3001,n,hangup
exten => 4xxx,1,Set(ROAM=${DB(roam/ext)})
exten => 4xxx,n,dial(SIP/${ROAM})

Regards
Axelle.



More information about the asterisk-users mailing list