Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP Office to Asterisk with PJSIP!!

Status
Not open for further replies.

quazimotto

Programmer
Mar 29, 2008
774
US
Greetings Gentlemen,

I am attempting to connect an IP Office with an Asterisk using PJSIP instead of SIP. I know there is an example of Asterisk to IPO on this site. Anyway in Monitor, I see the Asterisk attempting to register but I don't have an incoming call route configured for the IP line because I don't know what to do with what the Asterisk box is sending.

Here is the monitor shot for the IP Line. I believe you guys will know how to configure this in a snap.

2795763mS SIP Rx: UDP 192.168.1.226:5060 -> 192.168.1.225:5060
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.1.225:5060;rport=5060;received=192.168.1.225;branch=z9hG4bK25227f1a0cdd26bb88d6f511d765f917
Call-ID: 66b97f67f83d876b88c9521c1969da18@192.168.1.225
From: <sip:ipo@192.168.1.226>;tag=217f0eb461b0eab0
To: <sip:ipo@192.168.1.226>;tag=z9hG4bK25227f1a0cdd26bb88d6f511d765f917
CSeq: 1797818821 REGISTER
Server: Asterisk PBX 16.12.0
Content-Length: 0

2795766mS CMLineRx: v=0
CMReleaseComp
Line: type=SIPLine 17 Call: lid=0 id=1392 in=0
IE CMIERespondingPartyNumber (230)(P:100 S:100 T:0 N:100 R:4) number=ipo@192.168.1.226
IE CMIEDeviceDetail (231) c0a801e100000570 LOCALE=enu HW=8 VER=6 class=CMDeviceSIPTrunk type=0 number=17 channel=0 features=0x1 rx_gain=32 tx_gain=32 ep_callid=1392 ipaddr=192.168.1.225 apps=0 loc=0 em_loc=0 features2=0x0 is_spcall=0
Cause=1, Unallocated (unassigned) number

What do I do with number=ipo@192.168.1.226 ?

Thanks,
Quaz
 
IPO is not able to let other devices register against a SIP line. Registration is only possible for phones. You can set the trunk up without registration or you can try to register IPO as client to the Asterisk.

What do you mean with PJSIP? From what I know it's just assume kind of a library used to build different softphones on top of it.

IP Office remote service
IP Office certificate check
CLI based call blocking
SCN fallback over PSTN
 
I have an IPO connected Using the Sip channel. The config is in FAQ. PJSIP is a little different. The is no FAQ config so I have to come up with a config. Here is a monitor shot of an Asterisk config connecting Asterisk-13.35.0 to an IPO. I have included the Asterisk config that works. I am using the chan_sip channel to connect. I would like to connect an Asterisk-16 to same IPO using PJSIP. Both configs are there for you to peruse. I had to config an Incoming_Call_Route for this to work. The Asterisk log says: AOR '' not found for endpoint 'ast5_ipo'

Maybe you can make heads or tails of this. Let me know what you think, bitte.

Thanks,
Dave

Monitor_Output

72644500mS SIP Rx: UDP 192.168.1.227:5060 -> 192.168.1.225:5060
OPTIONS sip:192.168.1.225 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.227:5060;branch=z9hG4bK4523b555
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.1.227>;tag=as29d1df66
To: <sip:192.168.1.225>
Contact: <sip:asterisk@192.168.1.227:5060>
Call-ID: 46a1805d6166a4c6363384994caa8ef6@192.168.1.227:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.35.0
Date: Fri, 25 Sep 2020 13:35:06 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

72644504mS CMCallEvt: 0.10972.0 -1 BaseEP: NEW CMEndpoint fe7945f0 TOTAL NOW=1 CALL_LIST=0
72644505mS Stun: Info: media ports will not be mapped with STUN.
72644510mS SIP Tx: UDP 192.168.1.225:5060 -> 192.168.1.227:5060
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.1.227:5060;branch=z9hG4bK4523b555
From: "asterisk" <sip:asterisk@192.168.1.227>;tag=as29d1df66
To: <sip:192.168.1.225>;tag=cc7160e22b7c41a5
Call-ID: 46a1805d6166a4c6363384994caa8ef6@192.168.1.227:5060
CSeq: 102 OPTIONS
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, INFO, UPDATE
Supported: timer
Content-Type: application/sdp
Content-Length: 289

v=0
o=UserA 2356607549 1521837660 IN IP4 0.0.0.0
s=Session SDP
c=IN IP4 0.0.0.0
t=0 0
m=audio 8000 RTP/AVP 18 8 0 4 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:4 G723/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15


PJSIP_Example
[ast5_ipo]
type=registration
outbound_auth=ast5_ipo
server_uri=sip:ipo@192.168.1.225:5060
client_uri=sip:ipo@192.168.1.225:5060

[ast5_ipo]
type=auth
auth_type=userpass
password=1234567890
username=ipo

[ast5_ipo]
type=aor
contact=sip:192.168.1.225:5060

[ast5_ipo]
type=endpoint
context=from-external
disallow=all
allow=ulaw
outbound_auth=ast5_ipo
aors=ast5_ipo

[ast5_ipo]
type=identify
endpoint=ast5_ipo
match=192.168.1.225

SIP_Channel_Example
[ast4_ipo]
host=192.168.1.225
type=friend
insecure=port,invite
dtmfmode=rfc2833
canreinvite=no
qualify=yes
context=from-internal
disallow=all
allow=ulaw
allow=alaw


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top