Asterisk pjsip outbound registration on GSM gate GoIP 8

I had a similar question recently but on incoming registration, I don’t know if this will be a violation.
I need to register on the GoIP8 GSM gateway to make outgoing calls to mobile phones. I took an example from the asterisk help system and tried to apply it.

Asterisk server IP 192.168.0.10
GoIP8 IP 192.168.0.20
login:sim1
password:sim1

pjsip.conf

[mytrunk]
type=registration
outbound_auth=mytrunk
server_uri=192.168.0.20:5060
client_uri=sip:sim1@192.168.0.20:5060
retry_interval=60

[mytrunk]
type=auth
auth_type=userpass
password=sim1
username=sim1

[mytrunk]
type=aor
contact=sip:sim1@192.168.0.20:5060

[mytrunk]
type=endpoint
context=default
disallow=all
allow=ulaw
outbound_auth=mytrunk
aors=mytrunk

[mytrunk]
type=identify
endpoint=mytrunk
match=192.168.0.20

This error output

res_pjsip_outbound_registration.c:1047 schedule_retry: No response received from ‘sip:sim1@192.168.0.20:5060’ on registration attempt to ‘sip:sim1@192.168.0.20:5060’, retrying in ‘60’

pjsip show registrations
mytrunk/sip:sim1@192.168.0.20:5060 mytrunk Rejected (exp. 63s ago)

No response received from ‘sip:92.168.0.20’

92???

For some reason, core reload with which I applied the changes from pjsip.conf stopped working. After a reboot the situation was fixed.

Applied last configuration and get error

res_pjsip_outbound_registration.c:1047 schedule_retry: No response received from ‘sip:sim1@192.168.0.20:5060’ on registration attempt to ‘sip:sim1@192.168.0.20:5060’, retrying in ‘60’

I updated the content itself in the text of the question

In PJSIP configuration you are setting Asterisk to register at to GoIP8 GSM gateway.
Change type option "registration " to “endpoint”

He’s trying to do that, although it seems strange that it should use registration in both directions at the same time.

Changing the type would produce an invalid enpoint duplicating a good one.

In that case should delete one (should delete the first one).

He’s added it because he believes he needs to register with the gateway to make outbound calls.

No response isn’t what you should get if you try register when you shouldn’t. It is what you get when the request is sent to the wrong address, or lost, or the the response is sent to the wrong address, or lost.

I suppose it could also happen if Asterisk is configured for NAT and the local networks don’t cover 192.168.0.20

I use this manual A SIP trunk to your service provider, including outbound registration

According to information from the Internet, in order to use the gateway for incoming and outgoing calls, I need to create two trunks

  1. The trunk that comes from GoIP and transfers incoming calls to the asterisk and its type endpoint
  2. The trunk that goes from the asterisk to the GoIP is used for outgoing calls and its type registration

You helped set up the first trunk for incoming calls, it works, but I don’t understand how to implement outgoing calls via GoIP to mobile numbers. According to your comment, is it enough for me to have just one trunk for incoming and outgoing calls?

full listing pjsip.conf

[udp-transport-1]
type=transport
protocol=udp
bind=0.0.0.0:5060


//Trunk from GoIP for incomming calls from gsm
[111]
type=endpoint
transport=udp-transport-1
context=default
disallow=all
allow=alaw
aors=111
auth=111



[111]
type=aor
max_contacts=1
remove_existing=yes

[111]
type=auth
auth_type=userpass
password=sim1
username=111

[111]
type=identify
endpoint=111
match=192.168.0.20


//Trunk to GoIP for aoutgoing calls to GSM
[mytrunk]
type=endpoint
outbound_auth=mytrunk
server_uri=192.168.0.20:5060
client_uri=sip:sim1@192.168.0.20:5060
retry_interval=60

[mytrunk]
type=auth
auth_type=userpass
password=sim1
username=sim1

[mytrunk]
type=aor
contact=sip:sim1@192.168.0.20:5060

[mytrunk]
type=registration
context=default
disallow=all
allow=ulaw
outbound_auth=mytrunk
aors=mytrunk

[mytrunk]
type=identify
endpoint=mytrunk
match=192.168.0.20


//Zoiper soft phone client
[401]
type=endpoint
transport=udp-transport-1
context=default
disallow=all
allow=alaw
aors=401
auth=401
callerid=Mike Hammer<401>
;set_var=MY-USER-ID=user1@corpX.un
;set_var=MY-PSTN-CALLER-ID=8495123456X
;force_rport=yes
;rewrite_contact=yes
;rtp_symmetric=yes
;direct_media=no

[401]
type=aor
max_contacts=1
remove_existing=yes
;qualify_frequency=60

[401]
type=auth
auth_type=userpass
password=123456789
username=401

Do I need only one trunk to make incoming and outgoing calls through the GoIP GSM gateway?

Trunk is not a SIP or Asterisk concept.

I would expect a single SIM mobile gateway to be a single endpoint, but people do strange things.

It wasn’t a good idea to start a new thread, as one need information from you other thread,. This is basically all about interfacing the GoIP, not two unrelated questions.

First of all need to make clear what is the current situation.
On GoIP user manual depending on the models, have many configuration modes (please refer to your product information).

  1. Single Server Mode
  2. Config. By Line
  3. Config. By Group
  4. Trunk Gateway Mode
    By the way, on call configuration items it refers to a SIP Registrar Server.

The gateway is designed for several SIM cards and it does not matter to me how to use it in which mode. Initially, I chose Config By Line he is in this mode.

It is more strange for me that I cannot find just a ready-made example of a configuration file for a GoIP gsm gateway in pjsip format. This gateway is for 8 sim cards and I set it up in the Config By Line mode. I currently have only one SIM card in the gateway for the test, but maybe in the future I will add SIM cards.
At this stage, it does not matter to me how to configure the gateway and asterisk, in what mode they will work. All the information that I find on this topic is either about sip or for the web interface of free pbx, the asterisk wikipedia is also quite confusing and there are no working examples. Are there really thousands of different models of gateways in the world? Why can’t people add 2-3 very simple but working examples, if they were, then I would not ask such stupid questions here.

I don’t know how best to proceed, because the topics are still different, in the first one the incoming connection is configured, in this outgoing one. From my experience, even if the topics are similar but different, there will be confusion later on.

Isn´t the type of question, is based on the information inside the question, were other people can understand and give the right information.
Just for your reference in example on GoIP8 GSM gateway one the configuration mode it contemplate with no registration mode.
So how can expect other people can assume in your post how is configured your GSM gateway? and have the best answer.

I think you are making some kind of magic out of an asterisk. This gsm GoIP gateway is many years old and it seems that I am the first person to configure it in pjsip mode? It doesn’t matter to me how to connect to it, in what mode, but I still can’t find a really working pjsip asterisk configuration file for it.

No, absolutely no. Technology is not based and make any magic…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.