Gsm Gateway and Asterisk

Hello,

We recently purchased Dinstar DWG 2000C - 4G GSM Gateway, and we were unable to make it work properly.
We need a basic usage. This gateway had 3 SIM Cards/Channels which we registered as 3 SIP channels on asterisk - gsm0 to gsm2. That works.
When user calls asterisk, we want to be able to dial all these SIP channels. After first user responds to a call, other SIP channels (mobile phones) should stop ringing. The problem that we have is that as soon as the first line is connected, when the next user calls asterisk reply that ALL SIP lines are busy. This looks like some error in config, and I am posting our sip.conf and also extensions.conf. Hope that someone will be able to help.

PS: We are testing it on extension 8215


sip.conf

[gsm0]
type=friend
username=gsm0
secret=***
host=dynamic
nat=no
context=from-pstn

[gsm1]
type=friend
username=gsm1
secret=***
host=dynamic
nat=no
context=from-pstn

[gsm2]
type=friend
username=gsm2
secret=***
host=dynamic
nat=no
context=from-pstn


extensions.conf

[from-pstn]
;--------------------------------- test 8215
exten => 8215,1,Answer
exten => 8215,n,Goto(astronew,s,1)

[astronew]
exten => s,1,Answer
exten => s,n,Set(VOLUME(TX)=0)
exten => s,n,Dial(SIP/gsm0/063263587&SIP/gsm1/062440209,m(astrocentar))
exten => s,n,Hangup()

So after one of these sip channels connects, all other channels are busy.

Thanks in advance.

You are calling 2 channels at the same time and there is no gms2 dial command so when another tries to call out the channel are already in use.

If you want to cascade available channels do:
exten => yourexten,yourpriority,Dial(yourchannel1)
same => n,Dial(yourchannel2)
same => n,Dial(yourchannel3)

Hello and thank you for your reply.
but…

isn’t it the same?

this:

exten => s,n,Dial(SIP/gsm0/063263587&SIP/gsm1/062440209,m(astrocentar))

and

exten => s,n,Dial(SIP/gsm0/063263587,m(astrocentar))
exten => s,n,Dial(SIP/gsm1/062440209,m(astrocentar))

I think these two should be identical, ie in both ways it would call both?

the thing is that when one is busy it reports both as busy

Someone?

The first one dials on both SIMs at once. The second dials on one SIM and then dials on the second, if the first one fails.

I am somewhat concerned about parallel dialing over the air interface as air interface channels are scarce resources which are better used for genuinely mobile phones.

air interface meaning mobile phones?

i am not sure why that would matter. this clearly is something else. few minutes ago i tried picking a gsm1 line, and in that case, gsm0 was not busy in the next call… so to wrap up:

when i pick gsm0 and try to call this extension again , the gsm1 reports busy,
and when i pick gsm1 and try to call this extension again, gsm0 rings.

i use this:
exten => s,n,Dial(SIP/gsm0/063263587&SIP/gsm1/062440209,m(astrocentar))

very strange, isnt it?

pcmag.com/encyclopedia_term/ … 626,00.asp

Thanks David, but that doesn’t help in any way. To return to topic, here is an update.
It does seem to have something to do with Dinstar DWG 2000C Gateway, here’s why.

We have this is dialplan:

exten => s,n,Dial(SIP/gsm0/063263587&SIP/gsm1/062440209,m(astrocentar))

If gsm0 picks up the phone, gsm1 reports busy on the next call, but
if gsm1 picks up the phone first, the gsm0 rings normally on the next call.

Did anyone have any experience like this? Anyone had ever tried installing Dinstar gateway?

Any feedback is appreciated. If you want I can attach Dinstar settings panel.

This is driving us crazy.

Now we tried:
exten => s,n,Dial(SIP/gsm0/063263587,m(astrocentar))
exten => s,n,Dial(SIP/gsm1/062440209,m(astrocentar))

and gsm1 ringed fine when the gsm0 was busy

but when we do

exten => s,n,Dial(SIP/gsm0/063263587&SIP/gsm1/062440209,m(astrocentar))

gsm1 reports busy when gsm0 is busy

How do you explain this??? Makes no sense to me.

New update.
There seems to be a problem in misconfig of the GSM Gateway, since the calls from gsm0 are actually reaching 062440209 and calls from gsm1 are reaching 063263587 somehow.

Any help is welcome.

Ok 2 things

1 speak to the supplier of the gateway, and see what they have to say
2. do a sip trace and see whats actually happening, and post the details.

First of all you need to understand that:

this:

exten => s,n,Dial(SIP/gsm0/063263587&SIP/gsm1/062440209,m(astrocentar))

and

exten => s,n,Dial(SIP/gsm0/063263587,m(astrocentar))
exten => s,n,Dial(SIP/gsm1/062440209,m(astrocentar))

Are not the same. Then configure properly your GSM gateway and then test.

Hi Ian,

1 - Tried that, however unfortunately, Dinstar is not responding (sent mail 3 days ago)
2 - Here is a trace.

-- Executing [8215@from-pstn:1] Answer("SIP/lokal2-0000007c", "") in new stack

localhostCLI>
localhost
CLI>
– Executing [8215@from-pstn:2] Goto(“SIP/lokal2-0000007c”, “astronew,s,1”) in new stack
– Goto (astronew,s,1)
– Executing [s@astronew:1] Answer(“SIP/lokal2-0000007c”, “”) in new stack
– Executing [s@astronew:2] Set(“SIP/lokal2-0000007c”, “VOLUME(TX)=0”) in new stack
– Executing [s@astronew:3] Dial(“SIP/lokal2-0000007c”, “DAHDI/36&SIP/gsm0/063263587&SIP/gsm1/062440209,m(astrocentar)”) in new stack
– Called 36
== Using SIP RTP CoS mark 5
– Called gsm0/063263587
== Using SIP RTP CoS mark 5
– Called gsm1/062440209
– Started music on hold, class ‘astrocentar’, on SIP/lokal2-0000007c
[Jan 9 14:54:59] NOTICE[26045]: channel.c:3168 __ast_read: Dropping incompatible voice frame on SIP/lokal2-0000007c of format alaw since our native format has changed to 0x2 (gsm)
localhostCLI>
– DAHDI/36-1 is ringing
[Jan 9 14:54:59] WARNING[26045]: mp3/interface.c:216 decodeMP3: Junk at the beginning of frame 49443303
– SIP/gsm0-0000007d is making progress passing it to SIP/lokal2-0000007c
– SIP/gsm1-0000007e is making progress passing it to SIP/lokal2-0000007c
localhost
CLI>
localhostCLI>
localhost
CLI>
localhostCLI>
localhost
CLI>
[Jan 9 14:54:59] NOTICE[26045]: rtp.c:1144 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 192.168.1.50
[Jan 9 14:54:59] NOTICE[26045]: rtp.c:1144 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 192.168.1.50
localhostCLI>
localhost
CLI>
– DAHDI/36-1 is ringing
– DAHDI/36-1 is ringing
– SIP/gsm0-0000007d answered SIP/lokal2-0000007c
– Hungup ‘DAHDI/36-1’
– Stopped music on hold on SIP/lokal2-0000007c
– Started music on hold, class ‘default’, on SIP/gsm0-0000007d
[Jan 9 14:55:12] WARNING[26045]: mp3/interface.c:216 decodeMP3: Junk at the beginning of frame 49443303
== Using SIP RTP CoS mark 5
– Executing [8215@from-pstn:1] Answer(“SIP/lokal2-0000007f”, “”) in new stack
– Executing [8215@from-pstn:2] Goto(“SIP/lokal2-0000007f”, “astronew,s,1”) in new stack
– Goto (astronew,s,1)
– Executing [s@astronew:1] Answer(“SIP/lokal2-0000007f”, “”) in new stack
– Executing [s@astronew:2] Set(“SIP/lokal2-0000007f”, “VOLUME(TX)=0”) in new stack
– Executing [s@astronew:3] Dial(“SIP/lokal2-0000007f”, “DAHDI/36&SIP/gsm0/063263587&SIP/gsm1/062440209,m(astrocentar)”) in new stack
– Called 36
== Using SIP RTP CoS mark 5
– Called gsm0/063263587
== Using SIP RTP CoS mark 5
– Called gsm1/062440209
– Started music on hold, class ‘astrocentar’, on SIP/lokal2-0000007f
[Jan 9 14:55:19] NOTICE[26046]: channel.c:3168 __ast_read: Dropping incompatible voice frame on SIP/lokal2-0000007f of format alaw since our native format has changed to 0x2 (gsm)
– DAHDI/36-1 is ringing
[Jan 9 14:55:19] WARNING[26046]: mp3/interface.c:216 decodeMP3: Junk at the beginning of frame 49443303
– Got SIP response 486 “Busy Here” back from 192.168.1.50
– SIP/gsm1-00000081 is busy
– SIP/gsm0-00000080 is making progress passing it to SIP/lokal2-0000007f
[Jan 9 14:55:19] NOTICE[26046]: rtp.c:1144 process_rfc3389: Comfort noise support incomplete in Asterisk (RFC 3389). Please turn off on client if possible. Client IP: 192.168.1.50
– DAHDI/36-1 is ringing
– Got SIP response 486 “Busy Here” back from 192.168.1.50
– SIP/gsm0-00000080 is busy
– DAHDI/36-1 is ringing
– DAHDI/36-1 is ringing
[Jan 9 14:55:32] WARNING[26045]: rtp.c:1633 ast_rtp_read: RTP Read too short
localhost*CLI>

Navaismo, I am well aware of that.
I posted that as the reference and result of the test, which might spark someone’s idea about what’s going on.

About the trace - shortly explained - you can clearly see that during the first call SIP/gsm0-0000007d answered the call.

then in the second call, the SIP/gsm0 was busy, but it also reported SIP/gsm1 as busy.

That is what we don’t understand.