Hello,
I'm trying to use Kamailio as a customer facing SBC to handle NAT traversal and basic SBC functionality for a group of backend FreeSWITCH servers. What I'm trying to accomplish is this:
- UAC sends REGISTER
- Auth is handled by the edge proxy, backend server trusts edge proxy
- If NAT is detected, expires is decreased to 60 seconds, proxy sends options ping
- REGISTER is cached and forwarded upstream with Path header and longer expires, i.e. 3600 seconds
- UAC reregisters every < 60 seconds but upstream registration is only changed if the timer expires (just less than 3600 seconds) or if AoR changes
I good illustration is here:
http://www.markholloway.com/blog/?p=1826
My thought is to use htable to store the AoR with an expires just less than 3600, and check it before crafting a new REGISTER with uac module. Is there a better way of handling this scenario?
Is there an efficient way populate the $uac_req(…) pseudo variables and call uac_req_send() for multiple, i.e. 4-6 backend servers? I guess all I would need to change is the RURI?
Thanks,
Spencer
Hi ,
I'm trying to use the db_text and avpops modules to implement a simple custom database but having problems getting it to work .
I'm trying to find the Identity of the recipient for an inbound call based on the called number . I have a database file:-
1) LineIDs - contains the called numbers in the username field and an attribute for that line ID (inbound/ outbound) ,and the recipient identity in the value field
I am trying to get the attribute and value pairs that matches the line number in the user name column ,
id(int,auto) uuid(str,null) username(str) domain(str,null) attribute(str) type(int) value(str)
1::+12125551212::inbound:0:Foster
2::012125551212::inbound:0:Foster
3::12125551212::inbound:0:Foster
4::+4412125551212::inbound:0:Foster
5::+12125551213::inbound:0:Foster
6::012125551213::inbound:0:Foster
7::013440001::inbound:0:Foster
8::call-centre::inbound:0:MBA
9::call-centre::outbound:0:MBA
10::01344665544::inbound:0:chicken
11::01344665544::outbound:0:chicken
I try to load the AVPs that match a received number using the following line in the kamailio script file
$var(rc)=avp_db_load("01344665544/username","s:recipient/LineIDs");
I have also tried
$var(rc)=avp_db_load("01344665544/username","$avp(s:tenants)/LineIDs");
And
$var(rc)=avp_db_load("01344665544","$avp(i:123)/LineIDs");
But it fails to find any matching rows ( AVPS) . Am I using the function correctly ?
The debug output is shown below , there are some custom debug lines I have added in the db_text C files .
DEBUG: avpops [avpops_impl.c:378]: AVPOPS: calls db_load_avp
DEBUG: db_text [dbt_base.c:185]: DBTEXT: dbt_query called
DEBUG: db_text [dbt_file.c:102]: request for table [LineIDs]
DEBUG: db_text [dbt_file.c:109]: db is [/etc/kamailio/Tenants]
DEBUG: db_text [dbt_file.c:124]: loading file [/etc/kamailio/Tenants/LineIDs]
DEBUG: db_text [dbt_tb.c:187]: mtime is 1383910898
DEBUG: db_text [dbt_file.c:215]: column[0] is INT!
DEBUG: db_text [dbt_file.c:210]: column[1] is STR!
DEBUG: db_text [dbt_file.c:210]: column[2] is STR!
DEBUG: db_text [dbt_file.c:210]: column[3] is STR!
DEBUG: db_text [dbt_file.c:210]: column[4] is STR!
DEBUG: db_text [dbt_file.c:215]: column[5] is INT!
DEBUG: db_text [dbt_file.c:210]: column[6] is STR!
DEBUG: db_text [dbt_base.c:240]: new res with 3 cols
DEBUG: db_text [dbt_res.c:52]: DBTEXT: dbt_result_new called
DEBUG: db_text [dbt_res.c:79]: new res with 3 cols
DEBUG: db_text [dbt_res.c:100]: DBTEXT: dbt_result_new returns
DEBUG: db_text [dbt_api.c:255]: DBTEXT: dbt_get_result called
DEBUG: <core> [db_res.c:118]: allocate 48 bytes for result set at 0x7f334a85c390
DEBUG: <core> [db_res.c:155]: allocate 24 bytes for result names at 0x7f334a85c3e0
DEBUG: <core> [db_res.c:165]: allocate 12 bytes for result types at 0x7f334a85c1f0
DEBUG: db_text [dbt_api.c:80]: allocate 16 bytes for RES_NAMES[0] at 0x7f334a85c1c0
DEBUG: db_text [dbt_api.c:80]: allocate 16 bytes for RES_NAMES[1] at 0x7f334a85c420
DEBUG: db_text [dbt_api.c:80]: allocate 16 bytes for RES_NAMES[2] at 0x7f334a85c450
DEBUG: db_text [dbt_api.c:281]: DBTEXT: dbt_get_result returns 0
DEBUG: avpops [avpops_impl.c:389]: AVPOPS: db_load_avp returns 0
DEBUG: avpops [avpops_db.c:271]: close avp query
DEBUG: <core> [db_res.c:81]: freeing 3 columns
DEBUG: <core> [db_res.c:85]: freeing RES_NAMES[0] at 0x7f334a85c1c0
DEBUG: <core> [db_res.c:85]: freeing RES_NAMES[1] at 0x7f334a85c420
DEBUG: <core> [db_res.c:85]: freeing RES_NAMES[2] at 0x7f334a85c450
DEBUG: <core> [db_res.c:94]: freeing result names at 0x7f334a85c3e0
DEBUG: <core> [db_res.c:99]: freeing result types at 0x7f334a85c1f0
DEBUG: <core> [db_res.c:136]: freeing result set at 0x7f334a85c390
DEBUG: avpops [avpops_impl.c:420]: loaded avps = 0
INFO: avp_db_load return result is -1
I was expecting it to return at least one AVP .
Any suggestions gratefully received .
Hugh James
Hugh James | Telephony Developer
[icons]
* 0845 543 0822
*
* Hugh.James(a)semafone.com
* www.semafone.com<http://www.semafone.com>
* @semafone<http://twitter.com/semafone>
* SEMAFONE, 3 The Billings, Walnut Tree Close, Guildford, Surrey GU1 4UL
[logo]
This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information if you are not the named addressee or the person responsible for delivering the message to the named addressee, please telephone us immediately. Please note that we cannot guarantee that this message, or any attachment, is virus free or has not been intercepted and amended. The views of the author may not necessarily reflect those of the Company.
Hi!
I have an up and running msilo config with kamailio 4.0.4.
However, all the queued messages are delivered with a prefix "[Offline message - (date)(time)]".
Non queued messages are delivered unchanged.
Is there a way I can remove this prefix, so also queued messages get delivered unchanged?
Please advise!
Any help is appreciated!
Thanks you,
Marc
Hi all,
I'm trying to use rtpproxy-ng module (kamailio 4.1 from GIT) and
mediaproxy-ng (from https://github.com/sipwise/mediaproxy-ng) in
bridge ipv4-ipv6 mode with new NG protocol but keep getting "Failed to
extract streams from SDP: No address info found for stream" (log is
bellow).
Same setup, same SIP clients, same network but with old rtpproxy
module and mediaproxy-ng without NG protocol works fine for ipv4-ipv6
bridge mode. of course, only change is in Kamailio configuration where
now I load rtpproxy module and change sockets not to use new NG
protocol. mediaproxy-ng configuration is untouched.
Best regards
/Pavel
Nov 11 15:58:00 kamailio2 mediaproxy-ng[4790]: Got valid command from
183.24.6.201:57283: answer - { "sdp": "v=0#015#012o=john 0 0 IN IP6
2004:c23:d:caef:3426:666:e36c:12#015#012s=-#015#012c=IN IP6
2004:c23:d:caef:3426:666:e36c:12#015#012t=0 0#015#012m=audio 5076
RTP/AVP 96 9 97 98 100 102 0 8 103 3 104 101#015#012a=rtpmap:96
opus/48000#015#012a=fmtp:96 usedtx=1#015#012a=rtpmap:9
G722/8000#015#012a=rtpmap:97 SILK/24000#015#012a=rtpmap:98
SILK/16000#015#012a=rtpmap:100 speex/32000#015#012a=rtpmap:102
speex/16000#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap:8
PCMA/8000#015#012a=rtpmap:103 iLBC/8000#015#012a=rtpmap:3
GSM/8000#015#012a=rtpmap:104 speex/8000#015#012a=rtpmap:101
telephone-event/8000#015#012m=video 5078 RTP/AVP 105
99#015#012a=inactive#015#012a=rtpmap:105 H264/90000#015#012a=fmtp:105
profile-level-id=4DE01f;packetization-mode=1#015#012a=imageattr:105
send * recv [x=[0-1440],y=[0-900]]#015#012a=rtpmap:99
H264/90000#015#012a=fmtp:99
profile-level-id=4DE01f#015#012a=imageattr:99 send * recv
[x=[0-1440],y=[0-900]]#015#012", "direction": [ "external", "internal"
], "flags": [ "force", "symmetric" ], "call-id":
"60a061ef55655c340a4ffc536383c4ad@0:0:0:0:0:0:0:0", "via-branch":
"branch_v4_v6", "received-from": [ "?",
"2004:C23:D:CAEF:52e6:BB4:C6F2:1CAD" ], "from-tag": "3a21da16",
"to-tag": "5668dfd9", "command": "answer" }
Nov 11 15:58:00 kamailio2 mediaproxy-ng[4790]: Failed to extract
streams from SDP: No address info found for stream
Nov 11 15:58:00 kamailio2 mediaproxy-ng[4790]: Protocol error in
packet from 183.24.6.201:57283: Incomplete SDP specification
[d3:sdp771:v=0#015#012o=john 0 0 IN IP6
2004:c23:d:caef:3426:666:e36c:12#015#012s=-#015#012c=IN IP6
2004:c23:d:caef:3426:666:e36c:12#015#012t=0 0#015#012m=audio 5076
RTP/AVP 96 9 97 98 100 102 0 8 103 3 104 101#015#012a=rtpmap:96
opus/48000#015#012a=fmtp:96 usedtx=1#015#012a=rtpmap:9
G722/8000#015#012a=rtpmap:97 SILK/24000#015#012a=rtpmap:98
SILK/16000#015#012a=rtpmap:100 speex/32000#015#012a=rtpmap:102
speex/16000#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap:8
PCMA/8000#015#012a=rtpmap:103 iLBC/8000#015#012a=rtpmap:3
GSM/8000#015#012a=rtpmap:104 speex/8000#015#012a=rtpmap:101
telephone-event/8000#015#012m=video 5078 RTP/AVP 105
99#015#012a=inactive#015#012a=rtpmap:105 H264/90000#015#012a=fmtp:105
profile-level-id=4DE01f;packetization-mode=1#015#012a=imageattr:105
send * recv [x=[0-1440],y=[0-900]]#015#012a=rtpmap:99
H264/90000#015#012a=fmtp:99
profile-level-id=4DE01f#015#012a=imageattr:99 send * recv
[x=[0-1440],y=[0-900]]#015#0129:directionl8:external8:internale5:flagsl5:force9:symmetrice7:call-id48:60a061ef55655c340a4ffc536383c4ad@0:0:0:0:0:0:0:010:via-branch14:branch_v4_v613:received-froml1:?34:2004:C23:D:CAEF:52e6:BB4:C6F2:1CADe8:from-tag8:3a21da166:to-tag8:5668dfd97:command6:answere]
Nov 11 15:58:00 kamailio2 mediaproxy-ng[4790]: Returning to SIP proxy:
d6:result5:error12:error-reason28:Incomplete SDP specificatione
Hi list,
I have this structure
IP Phones -> Asterisk Client (LAN) -> (router) ->
Kamailio/RTPproxy(Internet) -> Asterisk (local from Kamailio) -> Trunk
SIP/Pstn
All is working well, I don't have problems with NAT and I managed about
6000 daily calls.
For a couple of months I've the next problem.The problem is that in the
Asterisk randomly received this message.
[Sep 29 04:04:29] NOTICE[3393] chan_sip.c: Peer 'kamONOp' is now Lagged.
(2075ms / 2000ms)
[Sep 29 04:04:41] NOTICE[3393] chan_sip.c: Peer 'kamailioONO' is now
Reachable. (1888ms / 2000ms)
In some Asterisk Client I get this message 10 times in a hour, and usually
coincide with periods of high load on the kamailo.
Also I am getting these messages in the log of Kamailio:
Nov 11 08:59:53 c1 /usr/local/sbin/kamailio[8079]: INFO: <core>
[forward.c:788]: broken reply to forward - no 2nd via
Nov 11 08:59:53 c1 /usr/local/sbin/kamailio[8082]: INFO: <core>
[forward.c:788]: broken reply to forward - no 2nd via
Are these two issues related?
Whay can I do?
Kind Regards
SiscoCS
(Sorry for my english)
Hi,
I am new to this mailing list and evaluating various options for a good
load balancer. Can somebody help let me know if we can choose two
algorithms (Ex: weighted and round robin) together for load balancing.
--
Thanks
Santosh
Hi!
Looking for some help as to why the SCA module is crashing randomly on
4.0.4. It has crashed several times with a backtrace that shows these
stack calls:
(gdb) backtrace
#0 0x00000000 in ?? ()
#1 0x4dceca11 in sca_hash_table_slot_kv_delete_unsafe () from
/usr/lib/kamailio/modules/sca.so
#2 0x4dcecaaa in sca_hash_table_slot_kv_delete () from
/usr/lib/kamailio/modules/sca.so
#3 0x4dcecb1e in sca_hash_table_index_kv_delete () from
/usr/lib/kamailio/modules/sca.so
#4 0x4dcecb99 in sca_hash_table_kv_delete () from
/usr/lib/kamailio/modules/sca.so
#5 0x4dcf30bc in sca_appearance_unregister () from
/usr/lib/kamailio/modules/sca.so
#6 0x4dd0d9b9 in sca_call_info_update () from
/usr/lib/kamailio/modules/sca.so
#7 0x126a6a9a in do_action ()
#8 0x126af88e in run_actions ()
#9 0x126a4731 in do_action ()
#10 0x126af88e in run_actions ()
#11 0x126b007f in run_top_route ()
#12 0x1269dd7e in receive_msg ()
#13 0x12734f01 in udp_rcv_loop ()
#14 0x126d3f56 in main_loop ()
#15 0x126d76de in main ()
The message that seemed to trigger the crash in this particular case was
the following INVITE:
INVITE sip:35705@10.250.16.71;user=phone SIP/2.0
*Record-Route:*<sip:10.250.16.70;lr=on;ftag=D8B14B68-93D21A25;did=513b.a3741>
*Via:* SIP/2.0/UDP 10.250.16.70;branch=z9hG4bKc43b.14d180e6.0
*Via:* SIP/2.0/UDP 10.250.88.116;branch=z9hG4bK8d3ec33e632D8AB3
*From:* PIN-1 WKL USA <sip:15862@*obscured*>;tag=D8B14B68-93D21A25
*To:* <sip:0@*obscured*;user=phone>
*CSeq:* 1 INVITE
*Call-ID:* c69594c-ff17a5d9-d6ed4f6a(a)10.250.88.116
*Contact:* <sip:15862@10.250.88.116>
*Allow:* INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE,
NOTIFY, PRACK, UPDATE, REFER
*User-Agent:* PolycomSoundPointIP-SPIP_335-UA/4.0.3.7562
*Accept-Language:* en
*Supported:* 100rel,replaces
*Allow-Events:* conference,talk,hold
*Max-Forwards:* 32
*Content-Type:* application/sdp
*Content-Length:* 296
v=0
o=- 1383792680 1383792680 IN IP4 10.250.88.116
s=Polycom IP Phone
c=IN IP4 10.250.88.116
t=0 0
a=sendrecv
m=audio 2230 RTP/AVP 9 18 0 8 101
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
I have a pcap trace that shows all the calls from 3 hours prior and this is
the first time this device appeared.
I followed the code down to the sca_hash_table_slot_kv_delete_unsafe
()routine and it appears to have crashed when it tried to use
e->free_entry which seems to have been NULL at that point. I'm not sure
how it could be NULL since it should have been initialized in
sca_hash_table_slot_kv_insert_unsafe
(). I'm guessing that either e->free_entry was never initialized or
somehow it was overwritten. Since several backtraces end in the same way
the bug seems to have be specific to some sequence of events I have not
been able to identify.
Any help tracking this down would be appreciated.
Thanks,
Bob
Hello,
I would like to know how to uninstall Kamailio. I will be upgrading from 3.0 to 3.3 and I would like to uninstall 3.0. I know that there is an upgrade procedure, but 3.0 now does not work and I would like to start from scratch.
thanks,
I am new to Kamailio and am having an issue with the dialplan setup. I have Kamailio setup as an SBC to handle all user authentication and call routing. I need freeswitch to handle all conferences and voicemails. When I dial 433001 I would like to be transferred to freeswitch for conferences. Right now I have followed the following article and it when I dial 433001 call hangs up and never reaches FS. If I call 43 call does reach FS and I am able to hear FS play the VM prompt.
My system is CentoOS 6.4 and FS is installed via yum, but Kamailio is complied. Both FS and Kamailio are on the same box.
What commands would you suggest I use to troubleshoot these issues in the future.
http://kb.asipto.com/freeswitch:kamailio-3.0.x-freeswitch-1.0.6d-ms#dokuwik…
Also, since I am new could you give some pointers as far as security and documentation.
thanks,
Hi, all
We have applied the openssl 1.0.1e patch described in the email chain
between Roberto Fichera and Daniel-Constantin Mierla back in August. But
Kamailio 4.0.4 still fails to start up and the log shows memory allocation
problem. By the way, we're running kamailio on RHEL 6.5. Wonder if we have
missed anything. Please advise. Thanks.
Ding