Regarding PJSUA_DEFAULT_AUDIO_FRAME_PTIME and mismatch between ptime offered by server and ptime applied by pjsua

SD
satej dhotkar
Wed, Jan 16, 2013 10:23 AM

hi all,
i am having problem related to ptime.

platform: I am having ARM platform on client side and Asterisk as PBX

server

I am offering * PJSUA_DEFAULT_AUDIO_FRAME_PTIME = 10*
        (pjsip/include/pjsua-lib/pjsua.h)
 and* G722 codec @ 16khz* and *--auto-answer enabled*
I am giving you list of conference ports before call establishment*

Buddy list:
-none-


---===========+
|      Call Commands:        |  Buddy, IM & Presence:  |
Account:      |
|                              |
|                  |
|  m  Make new call            | +b  Add new buddy      .| +a  Add new
accnt |
|  M  Make multiple calls      | -b  Delete buddy        | -a  Delete
accnt. |
|  a  Answer call              |  i  Send IM              | !a  Modify
accnt. |
|  h  Hangup call  (ha=all)    |  s  Subscribe presence  | rr
(Re-)register |
|  H  Hold call                |  u  Unsubscribe presence | ru
Unregister    |
|  v  re-inVite (release hold) |  t  ToGgle Online status |  >  Cycle next
ac.|
|  U  send UPDATE              |  T  Set online status    |  <  Cycle prev
ac.|
| ],[ Select next/prev call
+--------------------------+-------------------+
|  x  Xfer call                |      Media Commands:    |  Status &
Config: |
|  X  Xfer with Replaces      |
|                  |
|  #  Send RFC 2833 DTMF      | cl  List ports          |  d  Dump
status  |
|  *  Send DTMF with INFO      | cc  Connect port        | dd  Dump
detailed |
| dq  Dump curr. call quality  | cd  Disconnect port      | dc  Dump
config  |
|                              |  V  Adjust audio Volume  |  f  Save
config  |
|  S  Send arbitrary REQUEST  | Cp  Codec priorities    |  f  Save
config  |
+------------------------------+--------------------------+-------------------+
|  q  QUIT  L  ReLoad  sleep MS  echo [0|1|txt]    n: detect NAT
type    |
+

---===========+
You have 0 active call

cl

Conference ports:
Port #00[16KHz/10ms/1]        Master/sound  transmitting to:
Port #01[16KHz/10ms/1]            scomb-rev  transmitting to:

*and when server send 200 OK responce to client it offers ptime= 10 ms
but at the time of call establishment it established with ptime = 20ms

I am also giving packet of 200 OK responce from server where it shows ptime
= 10 ms

14:19:31.319  pjsua_core.c  RX 834 bytes Response msg

200/INVITE/cseq=11461 (rdata0x15545c) from UDP 192.168.0.3:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.10:5060
;branch=z9hG4bKPjlqmd7OMi96C5Y98RUL5aJa0t4Vh8SxH1;received=192.168.0.10;rport=5060
From: sip:0080@192.168.0.3;tag=z3eX0XyxqyMBjjNy8bnIL.bpC7emvgLl
To: sip:0050@192.168.0.3;tag=as31f911b3
Call-ID: E6.i7JuHv8aSFFXI8KfKhoduJn6nzyts
CSeq: 11461 INVITE
Server: Asterisk PBX 1.6.2.6
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uac
Contact: sip:0050@192.168.0.3
Content-Type: application/sdp
Content-Length: 259

v=0
o=root 767109880 767109880 IN IP4 192.168.0.3
s=Asterisk PBX 1.6.2.6
c=IN IP4 192.168.0.3
t=0 0
m=audio 12738 RTP/AVP 9 101
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:10
a=sendrecv

--end msg--

and list of conference ports after establishing call

You have 1 active call
Current call id=1 to sip:0050@192.168.0.3 [CONFIRMED]

cl

Conference ports:
Port #00[16KHz/10ms/1]        Master/sound  transmitting to:
Port #01[16KHz/10ms/1]            scomb-rev  transmitting to:
Port #02[16KHz*/20ms*/1] sip:0050@192.168.0.3  transmitting to:

I want to know is why pjsua taken ptime as 20ms since server offered pjsua
ptime=10ms??????

hi all, i am having problem related to ptime. platform: I am having ARM platform on client side and Asterisk as PBX server I am offering * PJSUA_DEFAULT_AUDIO_FRAME_PTIME = 10* (pjsip/include/pjsua-lib/pjsua.h) and* G722 codec @ 16khz* and *--auto-answer enabled* I am giving you list of conference ports before call establishment* * Buddy list: -none- +=============================================================================+ | Call Commands: | Buddy, IM & Presence: | Account: | | | | | | m Make new call | +b Add new buddy .| +a Add new accnt | | M Make multiple calls | -b Delete buddy | -a Delete accnt. | | a Answer call | i Send IM | !a Modify accnt. | | h Hangup call (ha=all) | s Subscribe presence | rr (Re-)register | | H Hold call | u Unsubscribe presence | ru Unregister | | v re-inVite (release hold) | t ToGgle Online status | > Cycle next ac.| | U send UPDATE | T Set online status | < Cycle prev ac.| | ],[ Select next/prev call +--------------------------+-------------------+ | x Xfer call | Media Commands: | Status & Config: | | X Xfer with Replaces | | | | # Send RFC 2833 DTMF | cl List ports | d Dump status | | * Send DTMF with INFO | cc Connect port | dd Dump detailed | | dq Dump curr. call quality | cd Disconnect port | dc Dump config | | | V Adjust audio Volume | f Save config | | S Send arbitrary REQUEST | Cp Codec priorities | f Save config | +------------------------------+--------------------------+-------------------+ | q QUIT L ReLoad sleep MS echo [0|1|txt] n: detect NAT type | +=============================================================================+ You have 0 active call >>> cl Conference ports: Port #00[16KHz/*10ms*/1] Master/sound transmitting to: Port #01[16KHz/*10ms*/1] scomb-rev transmitting to: *and when server send 200 OK responce to client it offers ptime= 10 ms but at the time of call establishment it established with ptime = 20ms I am also giving packet of 200 OK responce from server where it shows ptime = 10 ms * >>> 14:19:31.319 pjsua_core.c RX 834 bytes Response msg 200/INVITE/cseq=11461 (rdata0x15545c) from UDP 192.168.0.3:5060: SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.0.10:5060 ;branch=z9hG4bKPjlqmd7OMi96C5Y98RUL5aJa0t4Vh8SxH1;received=192.168.0.10;rport=5060 From: sip:0080@192.168.0.3;tag=z3eX0XyxqyMBjjNy8bnIL.bpC7emvgLl To: sip:0050@192.168.0.3;tag=as31f911b3 Call-ID: E6.i7JuHv8aSFFXI8KfKhoduJn6nzyts CSeq: 11461 INVITE Server: Asterisk PBX 1.6.2.6 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Require: timer Session-Expires: 1800;refresher=uac Contact: <sip:0050@192.168.0.3> Content-Type: application/sdp Content-Length: 259 v=0 o=root 767109880 767109880 IN IP4 192.168.0.3 s=Asterisk PBX 1.6.2.6 c=IN IP4 192.168.0.3 t=0 0 m=audio 12738 RTP/AVP 9 101 a=rtpmap:9 G722/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - *a=ptime:10* a=sendrecv --end msg-- *and list of conference ports after establishing call* You have 1 active call Current call id=1 to sip:0050@192.168.0.3 [CONFIRMED] >>> cl Conference ports: Port #00[16KHz/10ms/1] Master/sound transmitting to: Port #01[16KHz/10ms/1] scomb-rev transmitting to: Port #02[16KHz*/20ms*/1] sip:0050@192.168.0.3 transmitting to: *I want to know is why pjsua taken ptime as 20ms since server offered pjsua ptime=10ms??????*