Hi,
When I try to make an outbound call with a softphone (csipsimple on android or linphone on a computer) through asterisk to my SIP provider, the call is issued (the called phone rings and the communication is established when answered), but I don’t get any ringtone on the softphone. The ‘r’ option of the dial application does provide a ringtone, but I find it somehow artificial as it just rings whatever happens: I’d like to hear the ringtone from my SIP provider.
Note that if I register the softphone directly to my SIP provider, I do hear the ringtone.
Asterisk is on a public IP, the softphones are behind a NAT. As my SIP provider is in Switzerland, I set country=ch in indications.conf
The call logs do indicate that the progress of the call is passed to the softphone:
##############################################
== Using SIP RTP CoS mark 5
– Executing [+XXXXX@LocalSets:1] Progress(“SIP/lenovo-00000013”, “”) in new stack
– Executing [+XXXXX@LocalSets:2] Dial(“SIP/lenovo-00000013”, “SIP/sip_proxy-out/00XXXXX”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/sip_proxy-out/00XXXXX
– SIP/sip_proxy-out-00000014 is making progress passing it to SIP/lenovo-00000013
– SIP/sip_proxy-out-00000014 answered SIP/lenovo-00000013
– Remotely bridging SIP/lenovo-00000013 and SIP/sip_proxy-out-00000014
== Spawn extension (LocalSets, +XXXXX, 2) exited non-zero on ‘SIP/lenovo-00000013’
###############################################
My config files:
################# sip.conf ###############################
[general]
context=unauthenticated
allowguest=yes
srvlookup=yes
udpbindaddr=0.0.0.0
tcpenable=no
useragent=mydomain
register => user:pwd@sip.youroute.net/julien
preferred_codec_only=yes
disallow=all
allow=alaw
allow=ulaw
allow=speex
jbenable=yes
[sip_proxy]
type=peer
host=sip.youroute.net
context=from-switzernet
[sip_proxy-out]
type = peer
host = sip.youroute.net
defaultuser = user
qualify=no
fromuser=user
remotesecret = pwd
transport=udp
callbackextension=julien
soft-phone
type=friend
context=LocalSets
host=dynamic
secret=pwd
dtmfmode=rfc2833
vmexten=voicemail
mailbox=julien
lenovo
#######################################################################
########################## extensions.conf ###############################
[from-switzernet]
exten => s,1,Goto(LocalSets,julien,1)
[LocalSets]
exten => julien,1,Dial(SIP/htc-magic&SIP/lenovo,25)
same => n,VoiceMail(julien)
same => n,Hangup()
exten => lenovo,1,Dial(SIP/lenovo,25)
same => n,VoiceMail(julien)
same => n,Hangup()
exten => htc-magic,1,Dial(SIP/htc-magic,25)
same => n,VoiceMail(julien)
same => n,Hangup()
exten => _+.,1,Dial(SIP/sip_proxy-out/00${EXTEN:1})
exten => _00Z.,1,Dial(SIP/sip_proxy-out/${EXTEN})
exten => _0Z.,1,Dial(SIP/sip_proxy-out/0041${EXTEN:1})
exten => i,1,Playback(pbx-invalid)
same => n,Hangup()
exten => 3,1,VoicemailMain(julien)
exten => voicemail,1,Set(vmail=${SIPPEER(${CHANNEL(peername)},mailbox)})
same => n, GotoIf(MailboxExists(${vmail})?gotovoicemail:)
same => n, Playback(pbx-invalid)
same => n, Hangup()
same => n(gotovoicemail),VoicemailMain(${vmail},s)
[unauthenticated]
exten => julien,1,Goto(LocalSets,julien,1)
exten => htc-magic,1,Goto(LocalSets,htc-magic,1)
exten => lenovo,1,Goto(LocalSets,lenovo,1)
exten => i,1,Playback(pbx-invalid)
same => n,Hangup()
##############################################################################