Outgoing call Issue

Hello,

We are working on asterisk 13 with PJSIP.

I am having the issue with the outgoing call.

The incoming and outgoing call works fine.

However, if,
I make the outgoing call from the asterisk, it will ring the remote phone.
But, if I(callee on asterisk) hang up the phone within the few seconds, the remote phone keeps ringing. (The same thing happens the other way.)

Following is the pjsip.conf:

[global]
type=global
keep_alive_interval=20
endpoint_identifier_order=username,ip,anonymous

[simple]
type=transport
protocol=udp
bind=0.0.0.0
tos=cs7
cos=7

[simpletrans]
type=transport
protocol=tcp
bind=0.0.0.0:5060
tos=cs7
cos=7
local_net=xxx.xxx.xxx.xxx
external_media_address=xxx.xxx.xxx.xxx
external_signaling_address=xxx.xxx.xxx.xxx

[userxxx]
type=registration
outbound_auth=userxxx
outbound_proxy=sip:yyyyyy.twilio.com;transport=tcp
transport=simpletrans
line=yes
endpoint=userxxx
expiration=160
server_uri=sip:yyyyyy.twilio.com;transport=tcp
client_uri=sip:userxxx@yyyyyy.twilio.com;transport=tcp

[userxxx]
type=auth
auth_type=userpass
password=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
username=userxxx

[userxxx]
type=aor
remove_existing=yes
qualify_frequency=15
contact=sip:yyyyyy.twilio.com;transport=tcp

[userxxx]
type=endpoint
tos_audio=cs7
cos_audio=7
direct_media=no
force_rport=yes
rtp_symmetric=yes
context=incoming-userxxx
rewrite_contact=yes
transport=simpletrans
mailboxes=999@vmsetup
disallow=all
allow=gsm,ulaw,alaw,h263,h264
from_user=userxxxx
from_domain=yyyyyy.twilio.com;transport=tcp
aors=userxxx
outbound_auth=userxxx

[1111]
type=endpoint
transport=simple
context=incoming-userxxx
disallow=all
tos_audio=cs7
cos_audio=7
rewrite_contact=yes
rtp_symmetric=yes
dtmf_mode=rfc4733
allow=gsm,ulaw,alaw,h263,h264
mailboxes=1111@vmsetup
auth=1111
aors=1111

[1111]
type=auth
auth_type=userpass
password=xxxxxxxxxxxxxxx
username=1111

[1111]
type=aor
maximum_expiration=160
max_contacts=2

Do you guys think this is NAT issue? Please let me know how to solve it.

You need to provide the console output as well as the output of “pjsip set logger on” so the signaling can be shown.

1 Like

Thanks for replying.

This is the doc for the output of pjsip set logger on

Thanks.

What device are you calling from? There’s no other SIP signaling to show a calling party.

We are dialing from the grandstream phone which is connected to the asterisk. We also tried the analog phone and it gave us the same thing.

Also, we are using Twilio as the sip server.

The call is going through properly and I am getting the call on cell phone. But when I hang up on the analog/grandstream phone(callee), cell phone(caller) keeps ringing.

Example setup:

Callee -------------------------------------------------------------------> Caller
(Analog/Grandstream) -----------------------------------------------> (cell phone)
(asterisk)

I don’t see any signaling from the calling party in the information you have provided. Is it using chan_sip? Nothing stands out in what you’ve provided so far.

We are using chan_pjsip.

I am a beginner so do not know what u mean by the signaling from the calling party.
Please let me know what other information I can provide so you can get more information about our issue?

The output of “pjsip set logger on” shows the messages being sent and received. In the log you’ve provided I only see Twilio. I also don’t see any console output. This means I can’t see when we were told to stop dialing and how long it took us to tell Twilio. You need to provide the console output and “pjsip set logger on” of a call attempt so everything can be matched up.

Pls check the following attachments. I did the experiment again and turned off the qualify so we can get all the important packages.

Thanks

We are also doing the experiment with core set verbose 99 so we can see packates and console output together.

This doesn’t help. It also doesn’t have time stamps. It just shows an outgoing call to Twilio that we canceled.

We are also doing the experiment with core set verbose 99 so we can see packates and console output together.

Check the following:

We appear to have sent a CANCEL to Twilio to inform them to stop the call attempt. Why it was not accepted I do not know, nothing sticks out.