Asterisk, Grandstream and X-lite

Hello,

I have a quick question - Unfortunately i’m very new to Asterisk! I’m using a Asterisk call manager and Grandstream phones. I’ve recently been asked to look at setting up softphones for staff members to work at home. The softphone and the hard phone work fine when testing using my extension number, however I do have a small problem. Basically when i log into my extension using x-lite softphone, my hardphone doesn’t work. In order to get the hardphone to re-register I have to manually reboot it to get it going. Is there any way that I can set it up in asterisk or on the phone to stop this? Basically i just want to have essentially two phones (1 hard 1 soft) connected to the same extension number. And if any calls come in to ring on both at the same time.

Thanks, your help is very much appreciated.

James.

You are confusing device names (sometimes called equipment numbers) with extensions.

You need to have different entries in sip.conf for the two phones, then you can dial them both by doing:

exten => 1234,1,Dial(SIP/entry1&SIP/entry2)

Thanks David,

Right, so the current entry in Sip.conf for my Grandstream phone is for extension 123 - And the current entry in sip.conf looks like this;

[123]
type=peer
context=outgoing
secret=123
host=dynamic
call-limit=20
dtmfmode=rfc2833
username=123
disallow=all
allow=ulaw
progressinband=no
canreinvite=yes
callerid=“James Walker”<123>
subscribecontext=BLF_Group_1
mailbox=123@rbrlvm

Do I need to create another entry with another number (eg 124) for the softphone? and then add it to extensions.conf?

You need to add another entry, which may not be an extension number at all, and then, in extensions.conf, change:

exten -> 123,n,Dial(sip/123)

to

exten -> 123,n,Dial(sip/123&sip/124)

although, as I said, the 123 and 124 in sip.conf need not look like extension numbers at all.

Yes you do.
Then you could call as David wrote to you.
If you register 2 devices with same numbers - how Asterisk will know what to do? And as consequence Asterisk send ring etc to device which is last registered.
Meaning - last registration invalidates all other registrations.

Hi again,

I’ve made the entry in sip.conf, however can’t find "exten -> 123,n,Dial(sip/123) " in extensions.conf at-all - The closest thing like that i can see is in something called [BLF_Group_1] that says exten => 123,hint,SIP/100

Sorry to be a pain. Just started a new job and inherited this asterisk box to look after and don’t understand half of it! I know bits and bobs and am picking up some things. But getting these softphones to work is becoming a nightmare! hahah

Many thanks

James.

  1. Register softphone as 123, and device as 124 - you must have 123 and 124 in sip.conf
  2. Make extension 500
    exten => 500,1,Answer
    exten => 500,2,playback(/var/lib/asterisk/sounds/visit-asterisk-website)
    exten => 500,3,Hangup
    You must have file /var/lib/asterisk/sounds/visit-asterisk-website.wav or /var/lib/asterisk/sounds/visit-asterisk-website.gsm. If you havent - install sound files.
    Reload dialplan
    Dial from softphone 500
    Dial from grandstream 500
  3. Make extension 123
    exten => 123,1,dial(sip/123&sip/124)
    Reload dialplan
    Dial from some other phone which is registered to system 123

Ok, that makes sense, the only thing is, where abouts do i enter “exten => 123,1,dial(sip/123&sip/124)”

I’m guessing that I can’t just put it anywhere in extensions.conf?

You have to put it in default context.
And if there is something wrong - you have to find correct context.
By the way - you can read “Asterisk the Future of Telephony” - it is as pdf - free of charge. Just google it.

Cool, thanks very much for your help. I’ll have a look at the PDF.

Many thanks

James