Faild to connect softphone when transfer the call

Hello. I am going to forward the call from my asterisk server to softphone. but it not succeeded. Following I provide asterisk CLI log.
[Jan 24 10:29:53] NOTICE[100342][C-00000002]: translate.c:603 ast_translate: 6967 lost frame(s) 6968/0 (gsm@8000)->(slin@8000)->(alaw@8000)
– Executing [2@my_number:6] Dial(“PJSIP/4710505-00000002”, “PJSIP/sachith1,45,tTmL(1706092149.4)gw”) in new stack
– Setting call duration limit to 1706092.149 seconds.
– Called PJSIP/sachith1
– Started music on hold, class ‘default’, on channel ‘PJSIP/4710505-00000002’
[Jan 24 10:30:00] NOTICE[100342][C-00000002]: translate.c:603 ast_translate: 7321 lost frame(s) 7322/0 (gsm@8000)->(slin@8000)->(alaw@8000)
[Jan 24 10:30:03] NOTICE[100342][C-00000002]: translate.c:603 ast_translate: 7474 lost frame(s) 7475/0 (gsm@8000)->(slin@8000)->(alaw@8000)
[Jan 24 10:30:08] NOTICE[100342][C-00000002]: translate.c:603 ast_translate: 7687 lost frame(s) 7688/0 (gsm@8000)->(slin@8000)->(alaw@8000)
[Jan 24 10:30:12] NOTICE[100342][C-00000002]: translate.c:603 ast_translate: 7894 lost frame(s) 7895/0 (gsm@8000)->(slin@8000)->(alaw@8000)
[Jan 24 10:30:16] NOTICE[100342][C-00000002]: translate.c:603 ast_translate: 8116 lost frame(s) 8117/0 (gsm@8000)->(slin@8000)->(alaw@8000)

== Everyone is busy/congested at this time (1:0/0/1)
– Stopped music on hold on PJSIP/4710505-00000002
– Executing [2@my_number:7] Hangup(“PJSIP/4710505-00000002”, “”) in new stack
== Spawn extension (my_number, 2, 7) exited non-zero on ‘PJSIP/4710505-00000002’

How fix this issue?

It tried to call, and fail. You would need to check the endpoint named “sachith1” in “pjsip show endpoints” and if it appears valid (and is registered), then look at the SIP traffic by doing “pjsip set logger on” and trying again, as it may have rejected the call.

And in case you post about “[Jan 24 10:30:16] NOTICE[100342][C-00000002]: translate.c:603 ast_translate: 8116 lost frame(s) 8117/0 (gsm@8000)->(slin@8000)->(alaw@8000)” that is not in Asterisk as distributed by the project. That is from a third party patch.

This is my sachith1 endpoint

Endpoint: sachith1 Not in use 0 of inf
OutAuth: sachith1/sachith1
Aor: sachith1 0
Contact: sachith1/sip:sip.linphone.org:5061 9162da2fa9 NonQual nan
Transport: transport-udp udp 0 0 0.0.0.0:5060
Identify: sachith1/sachith1
Match: 51.89.71.129:5061/32
Match: [2001:41d0:700:1080::bb]:5061/128

And this is log output

<— Transmitting SIP request (910 bytes) to UDP:51.89.71.129:5061 —>
INVITE sip:sip.linphone.org:5061 SIP/2.0
Via: SIP/2.0/UDP 172.20.10.86:5060;rport;branch=z9hG4bKPj4e3051e2-d553-4364-b583-52574d941a2d
From: sip:4710505@172.20.10.86;tag=d0c3d98d-dc5a-465d-95a6-9f172fbaa64a
To: sip:sip.linphone.org
Contact: sip:asterisk@172.20.10.86:5060
Call-ID: b21fd536-645f-41a6-8283-ca3d46573f39
CSeq: 8293 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: asterisk
Content-Type: application/sdp
Content-Length: 261

v=0
o=- 1455137623 1455137623 IN IP4 172.20.10.86
s=Asterisk
c=IN IP4 172.20.10.86
t=0 0
m=audio 13696 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

In this case, I set up audio code and add sim into it. It’s IP is 172.20.xx.xxx. If I call to my sim, then I need to forward it into softphone. I got softphone IP from linphone.org. How fix this issue?

And this is sachith1, which has add into PJSIP.conf

[sachith1]

type=registration

transport=transport-udp

outbound_auth=sachith1

server_uri=sip:sip.linphone.org:5060

client_uri=sip:sachith1@sip.linphone.org:5060

retry_interval=60

[sachith1]

type=auth

auth_type=userpass

username=sachith1

password=12345 ; provider Password

[sachith1]

type=aor

contact=sip:sip.linphone.org:5061

[sachith1]

type=endpoint

transport=transport-udp

context=from_internal

disallow=all

allow=ulaw

allow=alaw

direct_media = no

outbound_auth=sachith1

aors=sachith1

[sachith1]

type=identify

endpoint=sachith1

match:5061=sip.linphone.org

You’re calling sip.linphone.org, without specifying any user to call at that domain. I expect they declined your call (you only showed the INVITE, not the complete SIP exchange) because you didn’t actually state who to call. I also don’t know how that really fits in with your arrangement. Maybe you mean to call PJSIP/sachith1@sachith1 which would call “sachith1@sip.linphone.org

Actually, you’re registering Asterisk to linphone as that user so nevermind. I don’t know your arrangement or how you’re expecting it to work with linphone.

Now I changed sachith1 to ishan2 and try it using ishan2@sip.linphone.org. This is the log

v=0
o=AudiocodesGW 924603795 924603794 IN IP4 172.20.11.159
s=Phone-Call
c=IN IP4 172.20.11.159
t=0 0
m=audio 6000 RTP/AVP 8 96
a=ptime:20
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15

-- Executing [2@my_number:6] Dial("PJSIP/4710505-00000000", "ishan2@sip.linphone.org,45,tTmL(1706094153.0)gw") in new stack
-- Setting call duration limit to 1706094.153 seconds.

[Jan 24 11:03:17] WARNING[100672][C-00000001]: app_dial.c:2605 dial_exec_full: Dial argument takes format (technology/resource)
– Executing [2@my_number:7] Hangup(“PJSIP/4710505-00000000”, “”) in new stack
== Spawn extension (my_number, 2, 7) exited non-zero on ‘PJSIP/4710505-00000000’
<— Transmitting SIP request (448 bytes) to TCP:172.20.11.159:61459 —>
BYE sip:4710505@172.20.11.159:61459;transport=TCP SIP/2.0
Via: SIP/2.0/TCP 172.20.10.86:5060;rport;branch=z9hG4bKPjbefaa64d-c9cf-49f6-ba55-758b7617031a;alias
From: sip:0114732155@172.20.10.86;user=phone;tag=7698603f-d03c-48b6-9d73-a23a3d18e4b7
To: sip:4710505@172.20.11.159;tag=1c817749924
Call-ID: 8177493343052010101821@172.20.11.159
CSeq: 23103 BYE
Reason: Q.850;cause=16
Max-Forwards: 70
User-Agent: asterisk
Content-Length: 0

If you have another method to success this process ( process is, I need to transfer call when user press a number then asterisk should forward(transfer) call to microsip softphone), can you suggest the method.

Your dial string is invalid. You would use:

PJSIP/ishan2@sachith1

Which would call user “ishan2” using the “sachith1” PJSIP endpoint.

You could have the phone directly register to Asterisk and not use linphone, but since you haven’t done that already I’m assuming there’s requirements or reasons you haven’t disclosed.

In this case, I’m trying to develop the call center solution with asterisk. In this test period, I’m trying to make settings for inbound call. I already add all inbound calls into IVR. Also I need to transfer call to agent. In this case I’m trying to do it using softphone with Linphone IPs. Is it possible to use for transfer call to agent?

If configured as linphone expects, possibly. As stated before I have no experience with linphone, so can only provide general statements. Someone else may have experience and can provide more insight.

Hello
I found the solution.


[general]

context=public

allowoverlap=no

udpbindaddr=0.0.0.0:5061

tcpenable=yes

tcpbindaddr=0.0.0.0:5061

transport=udp

srvlookup=yes

qualify=yes

[authentication]

[basic-options](!)

dtmfmode=rfc2833

context=from-office

type=friend

[natted-phone](!,basic-options)

directmedia=no

host=dynamic

[public-phone](!,basic-options)

directmedia=yes

[my-codecs](!)

disallow=all

allow=ilbc

allow=g729

allow=gsm

allow=g723

allow=ulaw

[ulaw-phone](!)

disallow=all

allow=ulaw

[sachith1]

type=friend

host=sip.linphone.org

username=sachxxxx

secret=xxxxx

context=my_number

I add this code into PJSIP.conf and I removed sachith1 from PJSIP.conf. And I add ‘same’ function to the extensions.conf as following.

same => n,Dial(SIP/sachith1,30,tTmL(${CONFID}))

Then it was successes and call was forwarded to sachith1

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